Skip to content

Commit

Permalink
NFC: nxp-nci: Fix probing without ACPI
Browse files Browse the repository at this point in the history
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 if
devm_acpi_dev_add_driver_gpios() fails.
Do the same in nxp-nci to fix this problem.

Fixes: ad0acfd ("NFC: nxp-nci: Get rid of code duplication in ->probe()")
Cc: Andy Shevchenko <[email protected]>
Signed-off-by: Stephan Gerhold <[email protected]>
Acked-by: Andy Shevchenko <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
stephan-gh authored and davem330 committed Dec 10, 2019
1 parent 991a345 commit 868afba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/nfc/nxp-nci/i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 868afba

Please sign in to comment.