Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 066185d6 authored by Ulf Hansson's avatar Ulf Hansson
Browse files

mmc: core: First step in cleaning up private mmc header files



This is the first step in cleaning up the private mmc header files. In this
change we makes sure each header file builds standalone, as that helps to
resolve dependencies.

While changing this, it also seems reasonable to stop including other
headers from inside a header itself which it don't depend upon.
Additionally, in some cases such dependencies are better resolved by
forward declaring the needed struct.

Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
Reviewed-by: default avatarShawn Lin <shawn.lin@rock-chips.com>
parent 8da00734
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
#ifndef _MMC_CORE_BLOCK_H
#define _MMC_CORE_BLOCK_H

struct mmc_queue;
struct request;

int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req);

#endif
+4 −0
Original line number Diff line number Diff line
@@ -11,6 +11,10 @@
#ifndef _MMC_CORE_BUS_H
#define _MMC_CORE_BUS_H

struct mmc_host;
struct mmc_card;
struct device_type;

#define MMC_DEV_ATTR(name, fmt, args...)					\
static ssize_t mmc_##name##_show (struct device *dev, struct device_attribute *attr, char *buf)	\
{										\
+4 −0
Original line number Diff line number Diff line
@@ -12,6 +12,10 @@
#define _MMC_CORE_CORE_H

#include <linux/delay.h>
#include <linux/sched.h>

struct mmc_host;
struct mmc_card;

#define MMC_CMD_RETRIES        3

+2 −1
Original line number Diff line number Diff line
@@ -10,7 +10,8 @@
 */
#ifndef _MMC_CORE_HOST_H
#define _MMC_CORE_HOST_H
#include <linux/mmc/host.h>

struct mmc_host;

int mmc_register_host_class(void);
void mmc_unregister_host_class(void);
+5 −0
Original line number Diff line number Diff line
@@ -12,6 +12,11 @@
#ifndef _MMC_MMC_OPS_H
#define _MMC_MMC_OPS_H

#include <linux/types.h>

struct mmc_host;
struct mmc_card;

int mmc_select_card(struct mmc_card *card);
int mmc_deselect_cards(struct mmc_host *host);
int mmc_set_dsr(struct mmc_host *host);
Loading