NFC: nxp-nci: Fix probing without ACPI
Subsystems (4)
PATCH 1/1 NFC: nxp-nci: Fix probing without ACPI
devm_acpi_dev_add_driver_gpios() returns -ENXIO if CONFIG_ACPI is disabled (e.g. on device tree platforms).
In this case, nxp-nci will silently fail to probe.
The other NFC drivers only log a debug message ifdevm_acpi_dev_add_driver_gpios() fails.
Do the same in nxp-nci to fix this problem.
--- drivers/nfc/nxp-nci/i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nfc/nxp-nci/i2c.c +1 -1
@@ -278,7 +278,7 @@ static int nxp_nci_i2c_probe(struct i2c_client *client, r =devm_acpi_dev_add_driver_gpios (dev, acpi_nxp_nci_gpios);if (r) -return r; +dev_dbg (dev,"Unable to add GPIO mapping table\n" ); phy->gpiod_en =devm_gpiod_get (dev,"enable" ,GPIOD_OUT_LOW );if (IS_ERR (phy->gpiod_en)) {
Signature · 1 line
2.24.0
Quoted 9 lines · Stephan Gerhold
devm_acpi_dev_add_driver_gpios()returns-ENXIOifCONFIG_ACPIis disabled (e.g. on device tree platforms).
In this case, nxp-nci will silently fail to probe.The other NFC drivers only log a debug message if
devm_acpi_dev_add_driver_gpios()fails.
Do the same in nxp-nci to fix this problem.
Ah, thanks!
Quoted 23 lines
Fixes ad0acfd69add ("NFC: nxp-nci: Get rid of code duplication in ->probe()")Cc Andy Shevchenko <[email protected]>Signed-off-by Stephan Gerhold <[email protected]>--- drivers/nfc/nxp-nci/i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/nfc/nxp-nci/i2c.c +1
-2@@ -278,7 +278,7 @@ static int nxp_nci_i2c_probe(struct i2c_client *client, r =devm_acpi_dev_add_driver_gpios (dev, acpi_nxp_nci_gpios);if (r) -return r; +dev_dbg (dev,"Unable to add GPIO mapping table\n" ); phy->gpiod_en =devm_gpiod_get (dev,"enable" ,GPIOD_OUT_LOW );if (IS_ERR (phy->gpiod_en)) { --2.24.0
Signature · 2 lines
With Best Regards, Andy Shevchenko
David Miller
maintainerFrom: Stephan Gerhold <[email protected]>
Date: Mon, 9 Dec 2019 19:53:43 +0100
Quoted 11 lines
devm_acpi_dev_add_driver_gpios()returns-ENXIOifCONFIG_ACPIis disabled (e.g. on device tree platforms).
In this case, nxp-nci will silently fail to probe.The other NFC drivers only log a debug message if
devm_acpi_dev_add_driver_gpios()fails.
Do the same in nxp-nci to fix this problem.Fixes ad0acfd69add ("NFC: nxp-nci: Get rid of code duplication in ->probe()")Cc Andy Shevchenko <[email protected]>Signed-off-by Stephan Gerhold <[email protected]>
Applied and queued up for v5.4 -stable, thanks.