diff options
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/core/bus.c | 3 | ||||
-rw-r--r-- | drivers/mmc/core/core.c | 6 | ||||
-rw-r--r-- | drivers/mmc/core/host.c | 5 | ||||
-rw-r--r-- | drivers/mmc/core/sdio_bus.c | 3 | ||||
-rw-r--r-- | drivers/mmc/host/mmc_spi.c | 2 | ||||
-rw-r--r-- | drivers/mmc/host/sdhci.c | 2 | ||||
-rw-r--r-- | drivers/mmc/host/tifm_sd.c | 16 |
7 files changed, 19 insertions, 18 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/core.c b/drivers/mmc/core/core.c index 044d84eeed7c..f7284b905eb3 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c | |||
@@ -280,7 +280,11 @@ void mmc_set_data_timeout(struct mmc_data *data, const struct mmc_card *card) | |||
280 | (card->host->ios.clock / 1000); | 280 | (card->host->ios.clock / 1000); |
281 | 281 | ||
282 | if (data->flags & MMC_DATA_WRITE) | 282 | if (data->flags & MMC_DATA_WRITE) |
283 | limit_us = 250000; | 283 | /* |
284 | * The limit is really 250 ms, but that is | ||
285 | * insufficient for some crappy cards. | ||
286 | */ | ||
287 | limit_us = 300000; | ||
284 | else | 288 | else |
285 | limit_us = 100000; | 289 | limit_us = 100000; |
286 | 290 | ||
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) |
diff --git a/drivers/mmc/host/mmc_spi.c b/drivers/mmc/host/mmc_spi.c index 07faf5412a1f..ad00e1632317 100644 --- a/drivers/mmc/host/mmc_spi.c +++ b/drivers/mmc/host/mmc_spi.c | |||
@@ -1348,7 +1348,7 @@ static int mmc_spi_probe(struct spi_device *spi) | |||
1348 | goto fail_add_host; | 1348 | goto fail_add_host; |
1349 | 1349 | ||
1350 | dev_info(&spi->dev, "SD/MMC host %s%s%s%s%s\n", | 1350 | dev_info(&spi->dev, "SD/MMC host %s%s%s%s%s\n", |
1351 | mmc->class_dev.bus_id, | 1351 | dev_name(&mmc->class_dev), |
1352 | host->dma_dev ? "" : ", no DMA", | 1352 | host->dma_dev ? "" : ", no DMA", |
1353 | (host->pdata && host->pdata->get_ro) | 1353 | (host->pdata && host->pdata->get_ro) |
1354 | ? "" : ", no WP", | 1354 | ? "" : ", no WP", |
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 30f64b1f2354..4d010a984bed 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c | |||
@@ -1733,7 +1733,7 @@ int sdhci_add_host(struct sdhci_host *host) | |||
1733 | mmc_add_host(mmc); | 1733 | mmc_add_host(mmc); |
1734 | 1734 | ||
1735 | printk(KERN_INFO "%s: SDHCI controller on %s [%s] using %s%s\n", | 1735 | printk(KERN_INFO "%s: SDHCI controller on %s [%s] using %s%s\n", |
1736 | mmc_hostname(mmc), host->hw_name, mmc_dev(mmc)->bus_id, | 1736 | mmc_hostname(mmc), host->hw_name, dev_name(mmc_dev(mmc)), |
1737 | (host->flags & SDHCI_USE_ADMA)?"A":"", | 1737 | (host->flags & SDHCI_USE_ADMA)?"A":"", |
1738 | (host->flags & SDHCI_USE_DMA)?"DMA":"PIO"); | 1738 | (host->flags & SDHCI_USE_DMA)?"DMA":"PIO"); |
1739 | 1739 | ||
diff --git a/drivers/mmc/host/tifm_sd.c b/drivers/mmc/host/tifm_sd.c index 13844843e8de..82554ddec6b3 100644 --- a/drivers/mmc/host/tifm_sd.c +++ b/drivers/mmc/host/tifm_sd.c | |||
@@ -632,7 +632,7 @@ static void tifm_sd_request(struct mmc_host *mmc, struct mmc_request *mrq) | |||
632 | 632 | ||
633 | if (host->req) { | 633 | if (host->req) { |
634 | printk(KERN_ERR "%s : unfinished request detected\n", | 634 | printk(KERN_ERR "%s : unfinished request detected\n", |
635 | sock->dev.bus_id); | 635 | dev_name(&sock->dev)); |
636 | mrq->cmd->error = -ETIMEDOUT; | 636 | mrq->cmd->error = -ETIMEDOUT; |
637 | goto err_out; | 637 | goto err_out; |
638 | } | 638 | } |
@@ -672,7 +672,7 @@ static void tifm_sd_request(struct mmc_host *mmc, struct mmc_request *mrq) | |||
672 | ? PCI_DMA_TODEVICE | 672 | ? PCI_DMA_TODEVICE |
673 | : PCI_DMA_FROMDEVICE)) { | 673 | : PCI_DMA_FROMDEVICE)) { |
674 | printk(KERN_ERR "%s : scatterlist map failed\n", | 674 | printk(KERN_ERR "%s : scatterlist map failed\n", |
675 | sock->dev.bus_id); | 675 | dev_name(&sock->dev)); |
676 | mrq->cmd->error = -ENOMEM; | 676 | mrq->cmd->error = -ENOMEM; |
677 | goto err_out; | 677 | goto err_out; |
678 | } | 678 | } |
@@ -684,7 +684,7 @@ static void tifm_sd_request(struct mmc_host *mmc, struct mmc_request *mrq) | |||
684 | : PCI_DMA_FROMDEVICE); | 684 | : PCI_DMA_FROMDEVICE); |
685 | if (host->sg_len < 1) { | 685 | if (host->sg_len < 1) { |
686 | printk(KERN_ERR "%s : scatterlist map failed\n", | 686 | printk(KERN_ERR "%s : scatterlist map failed\n", |
687 | sock->dev.bus_id); | 687 | dev_name(&sock->dev)); |
688 | tifm_unmap_sg(sock, &host->bounce_buf, 1, | 688 | tifm_unmap_sg(sock, &host->bounce_buf, 1, |
689 | r_data->flags & MMC_DATA_WRITE | 689 | r_data->flags & MMC_DATA_WRITE |
690 | ? PCI_DMA_TODEVICE | 690 | ? PCI_DMA_TODEVICE |
@@ -748,7 +748,7 @@ static void tifm_sd_end_cmd(unsigned long data) | |||
748 | 748 | ||
749 | if (!mrq) { | 749 | if (!mrq) { |
750 | printk(KERN_ERR " %s : no request to complete?\n", | 750 | printk(KERN_ERR " %s : no request to complete?\n", |
751 | sock->dev.bus_id); | 751 | dev_name(&sock->dev)); |
752 | spin_unlock_irqrestore(&sock->lock, flags); | 752 | spin_unlock_irqrestore(&sock->lock, flags); |
753 | return; | 753 | return; |
754 | } | 754 | } |
@@ -789,7 +789,7 @@ static void tifm_sd_abort(unsigned long data) | |||
789 | printk(KERN_ERR | 789 | printk(KERN_ERR |
790 | "%s : card failed to respond for a long period of time " | 790 | "%s : card failed to respond for a long period of time " |
791 | "(%x, %x)\n", | 791 | "(%x, %x)\n", |
792 | host->dev->dev.bus_id, host->req->cmd->opcode, host->cmd_flags); | 792 | dev_name(&host->dev->dev), host->req->cmd->opcode, host->cmd_flags); |
793 | 793 | ||
794 | tifm_eject(host->dev); | 794 | tifm_eject(host->dev); |
795 | } | 795 | } |
@@ -906,7 +906,7 @@ static int tifm_sd_initialize_host(struct tifm_sd *host) | |||
906 | 906 | ||
907 | if (rc) { | 907 | if (rc) { |
908 | printk(KERN_ERR "%s : controller failed to reset\n", | 908 | printk(KERN_ERR "%s : controller failed to reset\n", |
909 | sock->dev.bus_id); | 909 | dev_name(&sock->dev)); |
910 | return -ENODEV; | 910 | return -ENODEV; |
911 | } | 911 | } |
912 | 912 | ||
@@ -933,7 +933,7 @@ static int tifm_sd_initialize_host(struct tifm_sd *host) | |||
933 | if (rc) { | 933 | if (rc) { |
934 | printk(KERN_ERR | 934 | printk(KERN_ERR |
935 | "%s : card not ready - probe failed on initialization\n", | 935 | "%s : card not ready - probe failed on initialization\n", |
936 | sock->dev.bus_id); | 936 | dev_name(&sock->dev)); |
937 | return -ENODEV; | 937 | return -ENODEV; |
938 | } | 938 | } |
939 | 939 | ||
@@ -954,7 +954,7 @@ static int tifm_sd_probe(struct tifm_dev *sock) | |||
954 | if (!(TIFM_SOCK_STATE_OCCUPIED | 954 | if (!(TIFM_SOCK_STATE_OCCUPIED |
955 | & readl(sock->addr + SOCK_PRESENT_STATE))) { | 955 | & readl(sock->addr + SOCK_PRESENT_STATE))) { |
956 | printk(KERN_WARNING "%s : card gone, unexpectedly\n", | 956 | printk(KERN_WARNING "%s : card gone, unexpectedly\n", |
957 | sock->dev.bus_id); | 957 | dev_name(&sock->dev)); |
958 | return rc; | 958 | return rc; |
959 | } | 959 | } |
960 | 960 | ||