]> Pileus Git - ~andy/linux/blobdiff - drivers/mmc/core/slot-gpio.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[~andy/linux] / drivers / mmc / core / slot-gpio.c
index 058242916cef1089ee2a8a22e8901464df7f4997..08c6b3dfe080497509e9f431d0ababdc51626b29 100644 (file)
@@ -100,7 +100,13 @@ int mmc_gpio_request_ro(struct mmc_host *host, unsigned int gpio)
 
        ctx = host->slot.handler_priv;
 
-       return gpio_request_one(gpio, GPIOF_DIR_IN, ctx->ro_label);
+       ret = gpio_request_one(gpio, GPIOF_DIR_IN, ctx->ro_label);
+       if (ret < 0)
+               return ret;
+
+       ctx->ro_gpio = gpio;
+
+       return 0;
 }
 EXPORT_SYMBOL(mmc_gpio_request_ro);