]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mmc: core: Don't return an error for CD/WP GPIOs when GPIOLIB is unset
authorUlf Hansson <ulf.hansson@linaro.org>
Mon, 14 Sep 2015 10:18:55 +0000 (12:18 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Oct 2015 21:43:25 +0000 (14:43 -0700)
commit344fa142ddc8d2316d0fc30eddf32bf56d19c01f
tree7f6a4a38642edbb14f10aba25d727bf9ba5f72d9
parentc1d40e01ad8c01eb36557dab69cefd972f5f0415
mmc: core: Don't return an error for CD/WP GPIOs when GPIOLIB is unset

commit 43934ece2ea72c1dd279c0b0478c1a036d5d77ee upstream.

When CONFIG_GPIOLIB is unset, its stubs will return -ENOSYS. That means
when the mmc core parses DT for CD/WP GPIOs via mmc_of_parse(), -ENOSYS
becomes propagated to the caller. Typically this means that the mmc host
driver fails to probe.

As the CD/WP GPIOs are already treated as optional, let's extend that to
cover the case when CONFIG_GPIOLIB is unset.

Reported-by: Michal Simek <michal.simek@xilinx.com>
Fixes: 16b23787fc70 ("mmc: sdhci-of-arasan: Call OF parsing for MMC")
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Tested-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mmc/core/host.c