Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aceca7b1 authored by Stephan Gerhold's avatar Stephan Gerhold Committed by Greg Kroah-Hartman
Browse files

NFC: nxp-nci: Fix probing without ACPI



[ Upstream commit 868afbaca1e2a7923e48b5e8c07be34660525db5 ]

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: ad0acfd6 ("NFC: nxp-nci: Get rid of code duplication in ->probe()")
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarStephan Gerhold <stephan@gerhold.net>
Acked-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 32730c21
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)) {