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

Commit 996ad568 authored by Nicolas Pitre's avatar Nicolas Pitre Committed by Linus Torvalds
Browse files

mmc: make SDIO device/driver struct accessors public



Especially with the PM framework, those are quite handy to have in driver
code too.

Signed-off-by: default avatarNicolas Pitre <nico@marvell.com>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 95cdfb72
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -20,9 +20,6 @@
#include "sdio_cis.h"
#include "sdio_bus.h"

#define dev_to_sdio_func(d)	container_of(d, struct sdio_func, dev)
#define to_sdio_driver(d)      container_of(d, struct sdio_driver, drv)

/* show configuration fields */
#define sdio_config_attr(field, format_string)				\
static ssize_t								\
+3 −0
Original line number Diff line number Diff line
@@ -67,6 +67,7 @@ struct sdio_func {

#define sdio_get_drvdata(f)	dev_get_drvdata(&(f)->dev)
#define sdio_set_drvdata(f,d)	dev_set_drvdata(&(f)->dev, d)
#define dev_to_sdio_func(d)	container_of(d, struct sdio_func, dev)

/*
 * SDIO function device driver
@@ -81,6 +82,8 @@ struct sdio_driver {
	struct device_driver drv;
};

#define to_sdio_driver(d)	container_of(d, struct sdio_driver, drv)

/**
 * SDIO_DEVICE - macro used to describe a specific SDIO device
 * @vend: the 16 bit manufacturer code