mmc: make SDIO device/driver struct accessors public
authorNicolas Pitre <nico@fluxnic.net>
Tue, 22 Sep 2009 23:45:30 +0000 (16:45 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 23 Sep 2009 14:39:38 +0000 (07:39 -0700)
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>
drivers/mmc/core/sdio_bus.c
include/linux/mmc/sdio_func.h

index 46284b52739785bbc768c6458214e5c0936323a2..d37464e296a507deb743182c3764714f83cdda9c 100644 (file)
@@ -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                                                         \
index 451bdfc858306089f65b4f10b5f9e3b1a159da25..ac3ab683fec6707fec51881eb300fbe697239a3f 100644 (file)
@@ -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