public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: slot-gpio: Fix missing assignment to ctx->ro_gpio
@ 2012-09-09  3:00 Chris Ball
  2012-09-09 21:21 ` Guennadi Liakhovetski
  0 siblings, 1 reply; 4+ messages in thread
From: Chris Ball @ 2012-09-09  3:00 UTC (permalink / raw)
  To: linux-mmc; +Cc: Guennadi Liakhovetski

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-09-10 21:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-09  3:00 [PATCH] mmc: slot-gpio: Fix missing assignment to ctx->ro_gpio Chris Ball
2012-09-09 21:21 ` Guennadi Liakhovetski
2012-09-10  2:56   ` [PATCH v2] " Chris Ball
2012-09-10 21:37     ` Guennadi Liakhovetski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox