diff options
| -rw-r--r-- | drivers/mmc/card/queue.c | 14 | ||||
| -rw-r--r-- | drivers/mmc/host/at91_mci.c | 8 | ||||
| -rw-r--r-- | drivers/mmc/host/wbsd.c | 10 |
3 files changed, 16 insertions, 16 deletions
diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c index c9a289c6c139..b0abc7d92805 100644 --- a/drivers/mmc/card/queue.c +++ b/drivers/mmc/card/queue.c | |||
| @@ -117,7 +117,6 @@ int mmc_init_queue(struct mmc_queue *mq, struct mmc_card *card, spinlock_t *lock | |||
| 117 | struct mmc_host *host = card->host; | 117 | struct mmc_host *host = card->host; |
| 118 | u64 limit = BLK_BOUNCE_HIGH; | 118 | u64 limit = BLK_BOUNCE_HIGH; |
| 119 | int ret; | 119 | int ret; |
| 120 | unsigned int bouncesz; | ||
| 121 | 120 | ||
| 122 | if (mmc_dev(host)->dma_mask && *mmc_dev(host)->dma_mask) | 121 | if (mmc_dev(host)->dma_mask && *mmc_dev(host)->dma_mask) |
| 123 | limit = *mmc_dev(host)->dma_mask; | 122 | limit = *mmc_dev(host)->dma_mask; |
| @@ -134,6 +133,8 @@ int mmc_init_queue(struct mmc_queue *mq, struct mmc_card *card, spinlock_t *lock | |||
| 134 | 133 | ||
| 135 | #ifdef CONFIG_MMC_BLOCK_BOUNCE | 134 | #ifdef CONFIG_MMC_BLOCK_BOUNCE |
| 136 | if (host->max_hw_segs == 1) { | 135 | if (host->max_hw_segs == 1) { |
| 136 | unsigned int bouncesz; | ||
| 137 | |||
| 137 | bouncesz = MMC_QUEUE_BOUNCESZ; | 138 | bouncesz = MMC_QUEUE_BOUNCESZ; |
| 138 | 139 | ||
| 139 | if (bouncesz > host->max_req_size) | 140 | if (bouncesz > host->max_req_size) |
| @@ -156,14 +157,14 @@ int mmc_init_queue(struct mmc_queue *mq, struct mmc_card *card, spinlock_t *lock | |||
| 156 | GFP_KERNEL); | 157 | GFP_KERNEL); |
| 157 | if (!mq->sg) { | 158 | if (!mq->sg) { |
| 158 | ret = -ENOMEM; | 159 | ret = -ENOMEM; |
| 159 | goto free_bounce_buf; | 160 | goto cleanup_queue; |
| 160 | } | 161 | } |
| 161 | 162 | ||
| 162 | mq->bounce_sg = kmalloc(sizeof(struct scatterlist) * | 163 | mq->bounce_sg = kmalloc(sizeof(struct scatterlist) * |
| 163 | bouncesz / 512, GFP_KERNEL); | 164 | bouncesz / 512, GFP_KERNEL); |
| 164 | if (!mq->bounce_sg) { | 165 | if (!mq->bounce_sg) { |
| 165 | ret = -ENOMEM; | 166 | ret = -ENOMEM; |
| 166 | goto free_sg; | 167 | goto cleanup_queue; |
| 167 | } | 168 | } |
| 168 | } | 169 | } |
| 169 | } | 170 | } |
| @@ -197,14 +198,13 @@ int mmc_init_queue(struct mmc_queue *mq, struct mmc_card *card, spinlock_t *lock | |||
| 197 | if (mq->bounce_sg) | 198 | if (mq->bounce_sg) |
| 198 | kfree(mq->bounce_sg); | 199 | kfree(mq->bounce_sg); |
| 199 | mq->bounce_sg = NULL; | 200 | mq->bounce_sg = NULL; |
| 200 | free_sg: | 201 | cleanup_queue: |
| 201 | kfree(mq->sg); | 202 | if (mq->sg) |
| 203 | kfree(mq->sg); | ||
| 202 | mq->sg = NULL; | 204 | mq->sg = NULL; |
| 203 | free_bounce_buf: | ||
| 204 | if (mq->bounce_buf) | 205 | if (mq->bounce_buf) |
| 205 | kfree(mq->bounce_buf); | 206 | kfree(mq->bounce_buf); |
| 206 | mq->bounce_buf = NULL; | 207 | mq->bounce_buf = NULL; |
| 207 | cleanup_queue: | ||
| 208 | blk_cleanup_queue(mq->queue); | 208 | blk_cleanup_queue(mq->queue); |
| 209 | return ret; | 209 | return ret; |
| 210 | } | 210 | } |
diff --git a/drivers/mmc/host/at91_mci.c b/drivers/mmc/host/at91_mci.c index 62564ccde03a..bfebd2fa7ada 100644 --- a/drivers/mmc/host/at91_mci.c +++ b/drivers/mmc/host/at91_mci.c | |||
| @@ -83,7 +83,7 @@ | |||
| 83 | 83 | ||
| 84 | #define AT91_MCI_ERRORS (AT91_MCI_RINDE | AT91_MCI_RDIRE | AT91_MCI_RCRCE \ | 84 | #define AT91_MCI_ERRORS (AT91_MCI_RINDE | AT91_MCI_RDIRE | AT91_MCI_RCRCE \ |
| 85 | | AT91_MCI_RENDE | AT91_MCI_RTOE | AT91_MCI_DCRCE \ | 85 | | AT91_MCI_RENDE | AT91_MCI_RTOE | AT91_MCI_DCRCE \ |
| 86 | | AT91_MCI_DTOE | AT91_MCI_OVRE | AT91_MCI_UNRE) | 86 | | AT91_MCI_DTOE | AT91_MCI_OVRE | AT91_MCI_UNRE) |
| 87 | 87 | ||
| 88 | #define at91_mci_read(host, reg) __raw_readl((host)->baseaddr + (reg)) | 88 | #define at91_mci_read(host, reg) __raw_readl((host)->baseaddr + (reg)) |
| 89 | #define at91_mci_write(host, reg, val) __raw_writel((val), (host)->baseaddr + (reg)) | 89 | #define at91_mci_write(host, reg, val) __raw_writel((val), (host)->baseaddr + (reg)) |
| @@ -676,15 +676,15 @@ static irqreturn_t at91_mci_irq(int irq, void *devid) | |||
| 676 | 676 | ||
| 677 | int_status = at91_mci_read(host, AT91_MCI_SR); | 677 | int_status = at91_mci_read(host, AT91_MCI_SR); |
| 678 | int_mask = at91_mci_read(host, AT91_MCI_IMR); | 678 | int_mask = at91_mci_read(host, AT91_MCI_IMR); |
| 679 | 679 | ||
| 680 | pr_debug("MCI irq: status = %08X, %08X, %08X\n", int_status, int_mask, | 680 | pr_debug("MCI irq: status = %08X, %08X, %08X\n", int_status, int_mask, |
| 681 | int_status & int_mask); | 681 | int_status & int_mask); |
| 682 | 682 | ||
| 683 | int_status = int_status & int_mask; | 683 | int_status = int_status & int_mask; |
| 684 | 684 | ||
| 685 | if (int_status & AT91_MCI_ERRORS) { | 685 | if (int_status & AT91_MCI_ERRORS) { |
| 686 | completed = 1; | 686 | completed = 1; |
| 687 | 687 | ||
| 688 | if (int_status & AT91_MCI_UNRE) | 688 | if (int_status & AT91_MCI_UNRE) |
| 689 | pr_debug("MMC: Underrun error\n"); | 689 | pr_debug("MMC: Underrun error\n"); |
| 690 | if (int_status & AT91_MCI_OVRE) | 690 | if (int_status & AT91_MCI_OVRE) |
diff --git a/drivers/mmc/host/wbsd.c b/drivers/mmc/host/wbsd.c index e0c9808fd424..9bf2a877113b 100644 --- a/drivers/mmc/host/wbsd.c +++ b/drivers/mmc/host/wbsd.c | |||
| @@ -1266,7 +1266,7 @@ static int __devinit wbsd_alloc_mmc(struct device *dev) | |||
| 1266 | return 0; | 1266 | return 0; |
| 1267 | } | 1267 | } |
| 1268 | 1268 | ||
| 1269 | static void __devexit wbsd_free_mmc(struct device *dev) | 1269 | static void wbsd_free_mmc(struct device *dev) |
| 1270 | { | 1270 | { |
| 1271 | struct mmc_host *mmc; | 1271 | struct mmc_host *mmc; |
| 1272 | struct wbsd_host *host; | 1272 | struct wbsd_host *host; |
| @@ -1358,7 +1358,7 @@ static int __devinit wbsd_request_region(struct wbsd_host *host, int base) | |||
| 1358 | return 0; | 1358 | return 0; |
| 1359 | } | 1359 | } |
| 1360 | 1360 | ||
| 1361 | static void __devexit wbsd_release_regions(struct wbsd_host *host) | 1361 | static void wbsd_release_regions(struct wbsd_host *host) |
| 1362 | { | 1362 | { |
| 1363 | if (host->base) | 1363 | if (host->base) |
| 1364 | release_region(host->base, 8); | 1364 | release_region(host->base, 8); |
| @@ -1434,7 +1434,7 @@ err: | |||
| 1434 | "Falling back on FIFO.\n", dma); | 1434 | "Falling back on FIFO.\n", dma); |
| 1435 | } | 1435 | } |
| 1436 | 1436 | ||
| 1437 | static void __devexit wbsd_release_dma(struct wbsd_host *host) | 1437 | static void wbsd_release_dma(struct wbsd_host *host) |
| 1438 | { | 1438 | { |
| 1439 | if (host->dma_addr) { | 1439 | if (host->dma_addr) { |
| 1440 | dma_unmap_single(mmc_dev(host->mmc), host->dma_addr, | 1440 | dma_unmap_single(mmc_dev(host->mmc), host->dma_addr, |
| @@ -1484,7 +1484,7 @@ static int __devinit wbsd_request_irq(struct wbsd_host *host, int irq) | |||
| 1484 | return 0; | 1484 | return 0; |
| 1485 | } | 1485 | } |
| 1486 | 1486 | ||
| 1487 | static void __devexit wbsd_release_irq(struct wbsd_host *host) | 1487 | static void wbsd_release_irq(struct wbsd_host *host) |
| 1488 | { | 1488 | { |
| 1489 | if (!host->irq) | 1489 | if (!host->irq) |
| 1490 | return; | 1490 | return; |
| @@ -1535,7 +1535,7 @@ static int __devinit wbsd_request_resources(struct wbsd_host *host, | |||
| 1535 | * Release all resources for the host. | 1535 | * Release all resources for the host. |
| 1536 | */ | 1536 | */ |
| 1537 | 1537 | ||
| 1538 | static void __devexit wbsd_release_resources(struct wbsd_host *host) | 1538 | static void wbsd_release_resources(struct wbsd_host *host) |
| 1539 | { | 1539 | { |
| 1540 | wbsd_release_dma(host); | 1540 | wbsd_release_dma(host); |
| 1541 | wbsd_release_irq(host); | 1541 | wbsd_release_irq(host); |
