mirror of
https://github.com/torvalds/linux.git
synced 2024-11-28 15:11:31 +00:00
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: Nicolas Pitre <nico@marvell.com> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
95cdfb72b9
commit
996ad5686c
@ -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 \
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user