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

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>

authored by

Nicolas Pitre and committed by
Linus Torvalds
996ad568 95cdfb72

+3 -3
-3
drivers/mmc/core/sdio_bus.c
··· 20 20 #include "sdio_cis.h" 21 21 #include "sdio_bus.h" 22 22 23 - #define dev_to_sdio_func(d) container_of(d, struct sdio_func, dev) 24 - #define to_sdio_driver(d) container_of(d, struct sdio_driver, drv) 25 - 26 23 /* show configuration fields */ 27 24 #define sdio_config_attr(field, format_string) \ 28 25 static ssize_t \
+3
include/linux/mmc/sdio_func.h
··· 67 67 68 68 #define sdio_get_drvdata(f) dev_get_drvdata(&(f)->dev) 69 69 #define sdio_set_drvdata(f,d) dev_set_drvdata(&(f)->dev, d) 70 + #define dev_to_sdio_func(d) container_of(d, struct sdio_func, dev) 70 71 71 72 /* 72 73 * SDIO function device driver ··· 81 80 82 81 struct device_driver drv; 83 82 }; 83 + 84 + #define to_sdio_driver(d) container_of(d, struct sdio_driver, drv) 84 85 85 86 /** 86 87 * SDIO_DEVICE - macro used to describe a specific SDIO device