Make the dump trigger off any input rather than just '1'. This allows you
to write "echo 1> dump_diag_data" and it'll do what you want rather than
erroring out pointlessly.

Signed-off-by: Oliver O'Halloran <ooh...@gmail.com>
---
 arch/powerpc/platforms/powernv/pci-ioda.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c 
b/arch/powerpc/platforms/powernv/pci-ioda.c
index b24339b..f684d3a 100644
--- a/arch/powerpc/platforms/powernv/pci-ioda.c
+++ b/arch/powerpc/platforms/powernv/pci-ioda.c
@@ -3047,9 +3047,6 @@ static int pnv_pci_diag_data_set(void *data, u64 val)
        struct pnv_phb *phb = data;
        s64 ret;
 
-       if (val != 1ULL)
-               return -EINVAL;
-
        /* Retrieve the diag data from firmware */
        ret = opal_pci_get_phb_diag_data2(phb->opal_id, phb->diag_data,
                                          phb->diag_data_size);
-- 
2.9.5

Reply via email to