aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/core
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2014-12-18 09:44:33 -0500
committerUlf Hansson <ulf.hansson@linaro.org>2015-01-19 03:56:16 -0500
commitb4cc580bb6fcd9f4f86483d566601984febc1d31 (patch)
treedc566c809d5aaea50b1b4cc13e543bc968f16032 /drivers/mmc/core
parenteddbc3abc5bf11bdfc92ef84fd97ec4d379b7278 (diff)
mmc: slot-gpio: Use the parent device while allocating data
We had a mix of using the class device and the parent device while allocating data through the devm_* managed functions. Let's be more consistent and always use the parent device. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/core')
-rw-r--r--drivers/mmc/core/slot-gpio.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mmc/core/slot-gpio.c b/drivers/mmc/core/slot-gpio.c
index a428f10747d2..f9a0c6e8001e 100644
--- a/drivers/mmc/core/slot-gpio.c
+++ b/drivers/mmc/core/slot-gpio.c
@@ -52,7 +52,7 @@ static int mmc_gpio_alloc(struct mmc_host *host)
52 * before device_add(), i.e., between mmc_alloc_host() and 52 * before device_add(), i.e., between mmc_alloc_host() and
53 * mmc_add_host() 53 * mmc_add_host()
54 */ 54 */
55 ctx = devm_kzalloc(&host->class_dev, sizeof(*ctx) + 2 * len, 55 ctx = devm_kzalloc(host->parent, sizeof(*ctx) + 2 * len,
56 GFP_KERNEL); 56 GFP_KERNEL);
57 if (ctx) { 57 if (ctx) {
58 ctx->ro_label = ctx->cd_label + len; 58 ctx->ro_label = ctx->cd_label + len;
@@ -121,7 +121,7 @@ int mmc_gpio_request_ro(struct mmc_host *host, unsigned int gpio)
121 121
122 ctx = host->slot.handler_priv; 122 ctx = host->slot.handler_priv;
123 123
124 ret = devm_gpio_request_one(&host->class_dev, gpio, GPIOF_DIR_IN, 124 ret = devm_gpio_request_one(host->parent, gpio, GPIOF_DIR_IN,
125 ctx->ro_label); 125 ctx->ro_label);
126 if (ret < 0) 126 if (ret < 0)
127 return ret; 127 return ret;
@@ -152,7 +152,7 @@ void mmc_gpiod_request_cd_irq(struct mmc_host *host)
152 irq = -EINVAL; 152 irq = -EINVAL;
153 153
154 if (irq >= 0) { 154 if (irq >= 0) {
155 ret = devm_request_threaded_irq(&host->class_dev, irq, 155 ret = devm_request_threaded_irq(host->parent, irq,
156 NULL, mmc_gpio_cd_irqt, 156 NULL, mmc_gpio_cd_irqt,
157 IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING | IRQF_ONESHOT, 157 IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
158 ctx->cd_label, host); 158 ctx->cd_label, host);
@@ -194,7 +194,7 @@ int mmc_gpio_request_cd(struct mmc_host *host, unsigned int gpio,
194 194
195 ctx = host->slot.handler_priv; 195 ctx = host->slot.handler_priv;
196 196
197 ret = devm_gpio_request_one(&host->class_dev, gpio, GPIOF_DIR_IN, 197 ret = devm_gpio_request_one(host->parent, gpio, GPIOF_DIR_IN,
198 ctx->cd_label); 198 ctx->cd_label);
199 if (ret < 0) 199 if (ret < 0)
200 /* 200 /*