Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+16 -1
+3 -1
drivers/mmc/core/slot-gpio.c
··· 18 18 #include <linux/module.h> 19 19 #include <linux/slab.h> 20 20 21 + #include "slot-gpio.h" 22 + 21 23 struct mmc_gpio { 22 24 struct gpio_desc *ro_gpio; 23 25 struct gpio_desc *cd_gpio; ··· 40 38 return IRQ_HANDLED; 41 39 } 42 40 43 - static int mmc_gpio_alloc(struct mmc_host *host) 41 + int mmc_gpio_alloc(struct mmc_host *host) 44 42 { 45 43 size_t len = strlen(dev_name(host->parent)) + 4; 46 44 struct mmc_gpio *ctx;
+13
drivers/mmc/core/slot-gpio.h
··· 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 + 11 + int mmc_gpio_alloc(struct mmc_host *host); 12 + 13 + #endif