mirror of
https://github.com/fail0verflow/switch-linux.git
synced 2025-05-04 02:34:21 -04:00
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>
This commit is contained in:
parent
b4cc580bb6
commit
7f133de1fb
2 changed files with 16 additions and 1 deletions
|
@ -18,6 +18,8 @@
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
|
|
||||||
|
#include "slot-gpio.h"
|
||||||
|
|
||||||
struct mmc_gpio {
|
struct mmc_gpio {
|
||||||
struct gpio_desc *ro_gpio;
|
struct gpio_desc *ro_gpio;
|
||||||
struct gpio_desc *cd_gpio;
|
struct gpio_desc *cd_gpio;
|
||||||
|
@ -38,7 +40,7 @@ static irqreturn_t mmc_gpio_cd_irqt(int irq, void *dev_id)
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int mmc_gpio_alloc(struct mmc_host *host)
|
int mmc_gpio_alloc(struct mmc_host *host)
|
||||||
{
|
{
|
||||||
size_t len = strlen(dev_name(host->parent)) + 4;
|
size_t len = strlen(dev_name(host->parent)) + 4;
|
||||||
struct mmc_gpio *ctx;
|
struct mmc_gpio *ctx;
|
||||||
|
|
13
drivers/mmc/core/slot-gpio.h
Normal file
13
drivers/mmc/core/slot-gpio.h
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2014 Linaro Ltd
|
||||||
|
*
|
||||||
|
* Author: Ulf Hansson <ulf.hansson@linaro.org>
|
||||||
|
*
|
||||||
|
* License terms: GNU General Public License (GPL) version 2
|
||||||
|
*/
|
||||||
|
#ifndef _MMC_CORE_SLOTGPIO_H
|
||||||
|
#define _MMC_CORE_SLOTGPIO_H
|
||||||
|
|
||||||
|
int mmc_gpio_alloc(struct mmc_host *host);
|
||||||
|
|
||||||
|
#endif
|
Loading…
Add table
Reference in a new issue