Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Andy Shevchenko and committed by
Chris Ball
265cdc90 453722b9

+10 -10
+1 -1
drivers/mmc/card/mmc_test.c
··· 1935 1935 static ssize_t mmc_test_store(struct device *dev, 1936 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 1939 struct mmc_test_card *test; 1940 1940 int testcase; 1941 1941
+7 -7
drivers/mmc/core/bus.c
··· 27 27 static ssize_t mmc_type_show(struct device *dev, 28 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 32 switch (card->type) { 33 33 case MMC_TYPE_MMC: ··· 61 61 static int 62 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 65 const char *type; 66 66 int retval = 0; 67 67 ··· 104 104 static int mmc_bus_probe(struct device *dev) 105 105 { 106 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 109 return drv->probe(card); 110 110 } ··· 112 112 static int mmc_bus_remove(struct device *dev) 113 113 { 114 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 117 drv->remove(card); 118 118 ··· 122 122 static int mmc_bus_suspend(struct device *dev, pm_message_t state) 123 123 { 124 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 126 int ret = 0; 127 127 128 128 if (dev->driver && drv->suspend) ··· 133 133 static int mmc_bus_resume(struct device *dev) 134 134 { 135 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 137 int ret = 0; 138 138 139 139 if (dev->driver && drv->resume) ··· 188 188 189 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 193 sdio_free_common_cis(card); 194 194
+1 -1
drivers/mmc/core/bus.h
··· 14 14 #define MMC_DEV_ATTR(name, fmt, args...) \ 15 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 18 return sprintf(buf, fmt, args); \ 19 19 } \ 20 20 static DEVICE_ATTR(name, S_IRUGO, mmc_##name##_show, NULL)
+1 -1
include/linux/mmc/card.h
··· 173 173 #define mmc_card_name(c) ((c)->cid.prod_name) 174 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 178 #define mmc_list_to_card(l) container_of(l, struct mmc_card, node) 179 179 #define mmc_get_drvdata(c) dev_get_drvdata(&(c)->dev)