Skip to content

Commit

Permalink
mmc: make SDIO device/driver struct accessors public
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Nicolas Pitre authored and Linus Torvalds committed Sep 23, 2009
1 parent 95cdfb7 commit 996ad56
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/mmc/core/sdio_bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
3 changes: 3 additions & 0 deletions include/linux/mmc/sdio_func.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 996ad56

Please sign in to comment.