diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2008-11-08 15:37:46 -0500 |
---|---|---|
committer | Pierre Ossman <drzeus@drzeus.cx> | 2008-11-08 15:37:46 -0500 |
commit | d1b268630875a7713b5d468a0c03403c5b721c8e (patch) | |
tree | 2ff8ad7879d2ab005820bd5cf88417456daf2d5e /drivers/mmc/core | |
parent | 493890e75d98810a3470b4aae23be628ee5e9667 (diff) |
mmc: struct device - replace bus_id with dev_name(), dev_set_name()
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-Off-By: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'drivers/mmc/core')
-rw-r--r-- | drivers/mmc/core/bus.c | 3 | ||||
-rw-r--r-- | drivers/mmc/core/host.c | 5 | ||||
-rw-r--r-- | drivers/mmc/core/sdio_bus.c | 3 |
3 files changed, 4 insertions, 7 deletions
diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c index 0d9b2d6f9ebf..f210a8ee6861 100644 --- a/drivers/mmc/core/bus.c +++ b/drivers/mmc/core/bus.c | |||
@@ -216,8 +216,7 @@ int mmc_add_card(struct mmc_card *card) | |||
216 | int ret; | 216 | int ret; |
217 | const char *type; | 217 | const char *type; |
218 | 218 | ||
219 | snprintf(card->dev.bus_id, sizeof(card->dev.bus_id), | 219 | dev_set_name(&card->dev, "%s:%04x", mmc_hostname(card->host), card->rca); |
220 | "%s:%04x", mmc_hostname(card->host), card->rca); | ||
221 | 220 | ||
222 | switch (card->type) { | 221 | switch (card->type) { |
223 | case MMC_TYPE_MMC: | 222 | case MMC_TYPE_MMC: |
diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c index 6da80fd4d974..5e945e64ead7 100644 --- a/drivers/mmc/core/host.c +++ b/drivers/mmc/core/host.c | |||
@@ -73,8 +73,7 @@ struct mmc_host *mmc_alloc_host(int extra, struct device *dev) | |||
73 | if (err) | 73 | if (err) |
74 | goto free; | 74 | goto free; |
75 | 75 | ||
76 | snprintf(host->class_dev.bus_id, BUS_ID_SIZE, | 76 | dev_set_name(&host->class_dev, "mmc%d", host->index); |
77 | "mmc%d", host->index); | ||
78 | 77 | ||
79 | host->parent = dev; | 78 | host->parent = dev; |
80 | host->class_dev.parent = dev; | 79 | host->class_dev.parent = dev; |
@@ -121,7 +120,7 @@ int mmc_add_host(struct mmc_host *host) | |||
121 | WARN_ON((host->caps & MMC_CAP_SDIO_IRQ) && | 120 | WARN_ON((host->caps & MMC_CAP_SDIO_IRQ) && |
122 | !host->ops->enable_sdio_irq); | 121 | !host->ops->enable_sdio_irq); |
123 | 122 | ||
124 | led_trigger_register_simple(host->class_dev.bus_id, &host->led); | 123 | led_trigger_register_simple(dev_name(&host->class_dev), &host->led); |
125 | 124 | ||
126 | err = device_add(&host->class_dev); | 125 | err = device_add(&host->class_dev); |
127 | if (err) | 126 | if (err) |
diff --git a/drivers/mmc/core/sdio_bus.c b/drivers/mmc/core/sdio_bus.c index 233d0f9b3c4b..46284b527397 100644 --- a/drivers/mmc/core/sdio_bus.c +++ b/drivers/mmc/core/sdio_bus.c | |||
@@ -239,8 +239,7 @@ int sdio_add_func(struct sdio_func *func) | |||
239 | { | 239 | { |
240 | int ret; | 240 | int ret; |
241 | 241 | ||
242 | snprintf(func->dev.bus_id, sizeof(func->dev.bus_id), | 242 | dev_set_name(&func->dev, "%s:%d", mmc_card_id(func->card), func->num); |
243 | "%s:%d", mmc_card_id(func->card), func->num); | ||
244 | 243 | ||
245 | ret = device_add(&func->dev); | 244 | ret = device_add(&func->dev); |
246 | if (ret == 0) | 245 | if (ret == 0) |