Skip to contentSkip to conversation

mmc: make SDIO device/driver struct accessors public

PATCH In review [email protected] 1 participant 1 message Sep 22, 2009 MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

PATCH 93/232 mmc: make SDIO device/driver struct accessors public

From: Nicolas Pitre <[email protected]>

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

---

 drivers/mmc/core/sdio_bus.c   |    3 ---
 include/linux/mmc/sdio_func.h |    3 +++
 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/mmc/core/sdio_bus.c renamed from drivers/mmc/core/sdio_bus.c~mmc-make-sdio-device-driver-struct-accessors-public +0 -3
diff -puN drivers/mmc/core/sdio_bus.c~mmc-make-sdio-device-driver-struct-accessors-public drivers/mmc/core/sdio_bus.c
@@ -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								\
include/linux/mmc/sdio_func.h renamed from include/linux/mmc/sdio_func.h~mmc-make-sdio-device-driver-struct-accessors-public +3 -0
diff -puN include/linux/mmc/sdio_func.h~mmc-make-sdio-device-driver-struct-accessors-public include/linux/mmc/sdio_func.h
@@ -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

_