aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2014-12-18 09:44:34 -0500
committerUlf Hansson <ulf.hansson@linaro.org>2015-01-19 03:56:17 -0500
commit7f133de1fbe9f496973aaaf22e830433600fa99e (patch)
tree371bdb66533b001210ca7fdb57d5b5cf022cfe4e /drivers/mmc
parentb4cc580bb6fcd9f4f86483d566601984febc1d31 (diff)
mmc: slot-gpio: Make mmc_gpio_alloc() available for MMC core
As a step in moving slot-gpio functions/structs closer to the MMC core, let's add a local header file for slot-gpio. In this initial step we move mmc_gpio_alloc() into the header file, to make it available for the MMC core. Following patches will show the utilization of it. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/core/slot-gpio.c4
-rw-r--r--drivers/mmc/core/slot-gpio.h13
2 files changed, 16 insertions, 1 deletions
diff --git a/drivers/mmc/core/slot-gpio.c b/drivers/mmc/core/slot-gpio.c
index f9a0c6e8001e..ec918c27e77f 100644
--- a/drivers/mmc/core/slot-gpio.c
+++ b/drivers/mmc/core/slot-gpio.c
@@ -18,6 +18,8 @@
18#include <linux/module.h> 18#include <linux/module.h>
19#include <linux/slab.h> 19#include <linux/slab.h>
20 20
21#include "slot-gpio.h"
22
21struct mmc_gpio { 23struct mmc_gpio {
22 struct gpio_desc *ro_gpio; 24 struct gpio_desc *ro_gpio;
23 struct gpio_desc *cd_gpio; 25 struct gpio_desc *cd_gpio;
@@ -38,7 +40,7 @@ static irqreturn_t mmc_gpio_cd_irqt(int irq, void *dev_id)
38 return IRQ_HANDLED; 40 return IRQ_HANDLED;
39} 41}
40 42
41static int mmc_gpio_alloc(struct mmc_host *host) 43int mmc_gpio_alloc(struct mmc_host *host)
42{ 44{
43 size_t len = strlen(dev_name(host->parent)) + 4; 45 size_t len = strlen(dev_name(host->parent)) + 4;
44 struct mmc_gpio *ctx; 46 struct mmc_gpio *ctx;
diff --git a/drivers/mmc/core/slot-gpio.h b/drivers/mmc/core/slot-gpio.h
new file mode 100644
index 000000000000..8c1854dc5d58
--- /dev/null
+++ b/drivers/mmc/core/slot-gpio.h
@@ -0,0 +1,13 @@
1/*
2 * Copyright (C) 2014 Linaro Ltd
3 *
4 * Author: Ulf Hansson <ulf.hansson@linaro.org>
5 *
6 * License terms: GNU General Public License (GPL) version 2
7 */
8#ifndef _MMC_CORE_SLOTGPIO_H
9#define _MMC_CORE_SLOTGPIO_H
10
11int mmc_gpio_alloc(struct mmc_host *host);
12
13#endif