diff options
author | Andy Shevchenko <andy.shevchenko@gmail.com> | 2010-09-17 20:32:25 -0400 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2010-10-23 09:11:12 -0400 |
commit | 265cdc900ce93c0cd2465d751fe75ff2e55e126e (patch) | |
tree | fcd524ca79da6410163c2c6dd58d0f0a933befed | |
parent | 453722b9f7366e5b8b46101358dd7bcaef62b59d (diff) |
mmc: rename dev_to_mmc_card() to mmc_dev_to_card()
Global symbols should use their subsystem name in a prefixed fashion.
Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
-rw-r--r-- | drivers/mmc/card/mmc_test.c | 2 | ||||
-rw-r--r-- | drivers/mmc/core/bus.c | 14 | ||||
-rw-r--r-- | drivers/mmc/core/bus.h | 2 | ||||
-rw-r--r-- | include/linux/mmc/card.h | 2 |
4 files changed, 10 insertions, 10 deletions
diff --git a/drivers/mmc/card/mmc_test.c b/drivers/mmc/card/mmc_test.c index 82d39bd4f55f..b992725ecbc9 100644 --- a/drivers/mmc/card/mmc_test.c +++ b/drivers/mmc/card/mmc_test.c | |||
@@ -1935,7 +1935,7 @@ static ssize_t mmc_test_show(struct device *dev, | |||
1935 | static ssize_t mmc_test_store(struct device *dev, | 1935 | static ssize_t mmc_test_store(struct device *dev, |
1936 | struct device_attribute *attr, const char *buf, size_t count) | 1936 | struct device_attribute *attr, const char *buf, size_t count) |
1937 | { | 1937 | { |
1938 | struct mmc_card *card = dev_to_mmc_card(dev); | 1938 | struct mmc_card *card = mmc_dev_to_card(dev); |
1939 | struct mmc_test_card *test; | 1939 | struct mmc_test_card *test; |
1940 | int testcase; | 1940 | int testcase; |
1941 | 1941 | ||
diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c index 27326c411735..e70bd6641cee 100644 --- a/drivers/mmc/core/bus.c +++ b/drivers/mmc/core/bus.c | |||
@@ -27,7 +27,7 @@ | |||
27 | static ssize_t mmc_type_show(struct device *dev, | 27 | static ssize_t mmc_type_show(struct device *dev, |
28 | struct device_attribute *attr, char *buf) | 28 | struct device_attribute *attr, char *buf) |
29 | { | 29 | { |
30 | struct mmc_card *card = dev_to_mmc_card(dev); | 30 | struct mmc_card *card = mmc_dev_to_card(dev); |
31 | 31 | ||
32 | switch (card->type) { | 32 | switch (card->type) { |
33 | case MMC_TYPE_MMC: | 33 | case MMC_TYPE_MMC: |
@@ -61,7 +61,7 @@ static int mmc_bus_match(struct device *dev, struct device_driver *drv) | |||
61 | static int | 61 | static int |
62 | mmc_bus_uevent(struct device *dev, struct kobj_uevent_env *env) | 62 | mmc_bus_uevent(struct device *dev, struct kobj_uevent_env *env) |
63 | { | 63 | { |
64 | struct mmc_card *card = dev_to_mmc_card(dev); | 64 | struct mmc_card *card = mmc_dev_to_card(dev); |
65 | const char *type; | 65 | const char *type; |
66 | int retval = 0; | 66 | int retval = 0; |
67 | 67 | ||
@@ -104,7 +104,7 @@ mmc_bus_uevent(struct device *dev, struct kobj_uevent_env *env) | |||
104 | static int mmc_bus_probe(struct device *dev) | 104 | static int mmc_bus_probe(struct device *dev) |
105 | { | 105 | { |
106 | struct mmc_driver *drv = to_mmc_driver(dev->driver); | 106 | struct mmc_driver *drv = to_mmc_driver(dev->driver); |
107 | struct mmc_card *card = dev_to_mmc_card(dev); | 107 | struct mmc_card *card = mmc_dev_to_card(dev); |
108 | 108 | ||
109 | return drv->probe(card); | 109 | return drv->probe(card); |
110 | } | 110 | } |
@@ -112,7 +112,7 @@ static int mmc_bus_probe(struct device *dev) | |||
112 | static int mmc_bus_remove(struct device *dev) | 112 | static int mmc_bus_remove(struct device *dev) |
113 | { | 113 | { |
114 | struct mmc_driver *drv = to_mmc_driver(dev->driver); | 114 | struct mmc_driver *drv = to_mmc_driver(dev->driver); |
115 | struct mmc_card *card = dev_to_mmc_card(dev); | 115 | struct mmc_card *card = mmc_dev_to_card(dev); |
116 | 116 | ||
117 | drv->remove(card); | 117 | drv->remove(card); |
118 | 118 | ||
@@ -122,7 +122,7 @@ static int mmc_bus_remove(struct device *dev) | |||
122 | static int mmc_bus_suspend(struct device *dev, pm_message_t state) | 122 | static int mmc_bus_suspend(struct device *dev, pm_message_t state) |
123 | { | 123 | { |
124 | struct mmc_driver *drv = to_mmc_driver(dev->driver); | 124 | struct mmc_driver *drv = to_mmc_driver(dev->driver); |
125 | struct mmc_card *card = dev_to_mmc_card(dev); | 125 | struct mmc_card *card = mmc_dev_to_card(dev); |
126 | int ret = 0; | 126 | int ret = 0; |
127 | 127 | ||
128 | if (dev->driver && drv->suspend) | 128 | if (dev->driver && drv->suspend) |
@@ -133,7 +133,7 @@ static int mmc_bus_suspend(struct device *dev, pm_message_t state) | |||
133 | static int mmc_bus_resume(struct device *dev) | 133 | static int mmc_bus_resume(struct device *dev) |
134 | { | 134 | { |
135 | struct mmc_driver *drv = to_mmc_driver(dev->driver); | 135 | struct mmc_driver *drv = to_mmc_driver(dev->driver); |
136 | struct mmc_card *card = dev_to_mmc_card(dev); | 136 | struct mmc_card *card = mmc_dev_to_card(dev); |
137 | int ret = 0; | 137 | int ret = 0; |
138 | 138 | ||
139 | if (dev->driver && drv->resume) | 139 | if (dev->driver && drv->resume) |
@@ -188,7 +188,7 @@ EXPORT_SYMBOL(mmc_unregister_driver); | |||
188 | 188 | ||
189 | static void mmc_release_card(struct device *dev) | 189 | static void mmc_release_card(struct device *dev) |
190 | { | 190 | { |
191 | struct mmc_card *card = dev_to_mmc_card(dev); | 191 | struct mmc_card *card = mmc_dev_to_card(dev); |
192 | 192 | ||
193 | sdio_free_common_cis(card); | 193 | sdio_free_common_cis(card); |
194 | 194 | ||
diff --git a/drivers/mmc/core/bus.h b/drivers/mmc/core/bus.h index 7813954e3199..00a19710b6b4 100644 --- a/drivers/mmc/core/bus.h +++ b/drivers/mmc/core/bus.h | |||
@@ -14,7 +14,7 @@ | |||
14 | #define MMC_DEV_ATTR(name, fmt, args...) \ | 14 | #define MMC_DEV_ATTR(name, fmt, args...) \ |
15 | static ssize_t mmc_##name##_show (struct device *dev, struct device_attribute *attr, char *buf) \ | 15 | static ssize_t mmc_##name##_show (struct device *dev, struct device_attribute *attr, char *buf) \ |
16 | { \ | 16 | { \ |
17 | struct mmc_card *card = dev_to_mmc_card(dev); \ | 17 | struct mmc_card *card = mmc_dev_to_card(dev); \ |
18 | return sprintf(buf, fmt, args); \ | 18 | return sprintf(buf, fmt, args); \ |
19 | } \ | 19 | } \ |
20 | static DEVICE_ATTR(name, S_IRUGO, mmc_##name##_show, NULL) | 20 | static DEVICE_ATTR(name, S_IRUGO, mmc_##name##_show, NULL) |
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h index 71acf19ecaf3..7bd49234cd88 100644 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h | |||
@@ -173,7 +173,7 @@ static inline int mmc_blksz_for_byte_mode(const struct mmc_card *c) | |||
173 | #define mmc_card_name(c) ((c)->cid.prod_name) | 173 | #define mmc_card_name(c) ((c)->cid.prod_name) |
174 | #define mmc_card_id(c) (dev_name(&(c)->dev)) | 174 | #define mmc_card_id(c) (dev_name(&(c)->dev)) |
175 | 175 | ||
176 | #define dev_to_mmc_card(d) container_of(d, struct mmc_card, dev) | 176 | #define mmc_dev_to_card(d) container_of(d, struct mmc_card, dev) |
177 | 177 | ||
178 | #define mmc_list_to_card(l) container_of(l, struct mmc_card, node) | 178 | #define mmc_list_to_card(l) container_of(l, struct mmc_card, node) |
179 | #define mmc_get_drvdata(c) dev_get_drvdata(&(c)->dev) | 179 | #define mmc_get_drvdata(c) dev_get_drvdata(&(c)->dev) |