diff options
author | Nicolas Pitre <nico@fluxnic.net> | 2009-09-22 19:45:30 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-23 10:39:38 -0400 |
commit | 996ad5686c5f868e67557cc1bfcb2cfdde1a18b4 (patch) | |
tree | a9075fe3acf1e8f847403c4b007aa25ccc742fe0 /include/linux/mmc/sdio_func.h | |
parent | 95cdfb72b9bc568803f395c266152c71b034b461 (diff) |
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>
Diffstat (limited to 'include/linux/mmc/sdio_func.h')
-rw-r--r-- | include/linux/mmc/sdio_func.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/mmc/sdio_func.h b/include/linux/mmc/sdio_func.h index 451bdfc85830..ac3ab683fec6 100644 --- a/include/linux/mmc/sdio_func.h +++ b/include/linux/mmc/sdio_func.h | |||
@@ -67,6 +67,7 @@ struct sdio_func { | |||
67 | 67 | ||
68 | #define sdio_get_drvdata(f) dev_get_drvdata(&(f)->dev) | 68 | #define sdio_get_drvdata(f) dev_get_drvdata(&(f)->dev) |
69 | #define sdio_set_drvdata(f,d) dev_set_drvdata(&(f)->dev, d) | 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 | * SDIO function device driver | 73 | * SDIO function device driver |
@@ -81,6 +82,8 @@ struct sdio_driver { | |||
81 | struct device_driver drv; | 82 | struct device_driver drv; |
82 | }; | 83 | }; |
83 | 84 | ||
85 | #define to_sdio_driver(d) container_of(d, struct sdio_driver, drv) | ||
86 | |||
84 | /** | 87 | /** |
85 | * SDIO_DEVICE - macro used to describe a specific SDIO device | 88 | * SDIO_DEVICE - macro used to describe a specific SDIO device |
86 | * @vend: the 16 bit manufacturer code | 89 | * @vend: the 16 bit manufacturer code |