From: <gregkh@linuxfoundation.org>
To: ulf.hansson@linaro.org, gregkh@linuxfoundation.org,
michal.simek@xilinx.com, vbyravarasu@nvidia.com
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "mmc: core: Don't return an error for CD/WP GPIOs when GPIOLIB is unset" has been added to the 4.1-stable tree
Date: Sat, 17 Oct 2015 16:57:52 -0700 [thread overview]
Message-ID: <144512627219978@kroah.com> (raw)
This is a note to let you know that I've just added the patch titled
mmc: core: Don't return an error for CD/WP GPIOs when GPIOLIB is unset
to the 4.1-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
mmc-core-don-t-return-an-error-for-cd-wp-gpios-when-gpiolib-is-unset.patch
and it can be found in the queue-4.1 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 43934ece2ea72c1dd279c0b0478c1a036d5d77ee Mon Sep 17 00:00:00 2001
From: Ulf Hansson <ulf.hansson@linaro.org>
Date: Mon, 14 Sep 2015 12:18:55 +0200
Subject: mmc: core: Don't return an error for CD/WP GPIOs when GPIOLIB is unset
From: Ulf Hansson <ulf.hansson@linaro.org>
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 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/mmc/core/host.c
+++ b/drivers/mmc/core/host.c
@@ -373,7 +373,7 @@ int mmc_of_parse(struct mmc_host *host)
0, &cd_gpio_invert);
if (!ret)
dev_info(host->parent, "Got CD GPIO\n");
- else if (ret != -ENOENT)
+ else if (ret != -ENOENT && ret != -ENOSYS)
return ret;
/*
@@ -397,7 +397,7 @@ int mmc_of_parse(struct mmc_host *host)
ret = mmc_gpiod_request_ro(host, "wp", 0, false, 0, &ro_gpio_invert);
if (!ret)
dev_info(host->parent, "Got WP GPIO\n");
- else if (ret != -ENOENT)
+ else if (ret != -ENOENT && ret != -ENOSYS)
return ret;
/* See the comment on CD inversion above */
Patches currently in stable-queue which might be from ulf.hansson@linaro.org are
queue-4.1/mmc-sdhci-esdhc-imx-do-not-break-platform-data-boards.patch
queue-4.1/dts-imx51-fix-sd-card-gpio-polarity-specified-in-device-tree.patch
queue-4.1/mmc-sdhci-esdhc-imx-move-mmc_of_parse-to-the-dt-probe.patch
queue-4.1/mmc-core-don-t-return-an-error-for-cd-wp-gpios-when-gpiolib-is-unset.patch
queue-4.1/mmc-dw_mmc-handle-data-blocks-than-4kb-if-idmac-is-used.patch
queue-4.1/mmc-sdhci-fix-dma-memory-leak-in-sdhci_pre_req.patch
queue-4.1/dts-imx25-fix-sd-card-gpio-polarity-specified-in-device-tree.patch
queue-4.1/dts-imx53-fix-sd-card-gpio-polarity-specified-in-device-tree.patch
queue-4.1/mmc-sdhci-esdhc-imx-fix-cd-regression-for-dt-platform.patch
reply other threads:[~2015-10-17 23:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=144512627219978@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=michal.simek@xilinx.com \
--cc=stable-commits@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=ulf.hansson@linaro.org \
--cc=vbyravarasu@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.