From: Chris Ball <cjb@laptop.org>
To: linux-mmc@vger.kernel.org
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Subject: [PATCH] mmc: slot-gpio: Fix missing assignment to ctx->ro_gpio
Date: Sat, 08 Sep 2012 23:00:01 -0400 [thread overview]
Message-ID: <87pq5vzyry.fsf@octavius.laptop.org> (raw)
mmc_gpio_request_ro() doesn't store the requested gpio in ctx->ro_gpio.
As a result, subsequent calls to mmc_gpio_get_ro() will always fail
with -ENOSYS because the gpio number isn't available to that function.
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
---
drivers/mmc/core/slot-gpio.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/mmc/core/slot-gpio.c b/drivers/mmc/core/slot-gpio.c
index 0582429..4f9b366 100644
--- a/drivers/mmc/core/slot-gpio.c
+++ b/drivers/mmc/core/slot-gpio.c
@@ -99,6 +99,7 @@ int mmc_gpio_request_ro(struct mmc_host *host, unsigned int gpio)
return ret;
ctx = host->slot.handler_priv;
+ ctx->ro_gpio = gpio;
return gpio_request_one(gpio, GPIOF_DIR_IN, ctx->ro_label);
}
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
next reply other threads:[~2012-09-09 3:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-09 3:00 Chris Ball [this message]
2012-09-09 21:21 ` [PATCH] mmc: slot-gpio: Fix missing assignment to ctx->ro_gpio Guennadi Liakhovetski
2012-09-10 2:56 ` [PATCH v2] " Chris Ball
2012-09-10 21:37 ` Guennadi Liakhovetski
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=87pq5vzyry.fsf@octavius.laptop.org \
--to=cjb@laptop.org \
--cc=g.liakhovetski@gmx.de \
--cc=linux-mmc@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox