Commit 5a0276b7 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc:
  mmc: at91_mci: remove whitespace at the end of lines
  mmc: reorganize bounce buffer init
  wbsd: fix section mismatch warnings
parents be12014d 37b758e8
...@@ -117,7 +117,6 @@ int mmc_init_queue(struct mmc_queue *mq, struct mmc_card *card, spinlock_t *lock ...@@ -117,7 +117,6 @@ int mmc_init_queue(struct mmc_queue *mq, struct mmc_card *card, spinlock_t *lock
struct mmc_host *host = card->host; struct mmc_host *host = card->host;
u64 limit = BLK_BOUNCE_HIGH; u64 limit = BLK_BOUNCE_HIGH;
int ret; int ret;
unsigned int bouncesz;
if (mmc_dev(host)->dma_mask && *mmc_dev(host)->dma_mask) if (mmc_dev(host)->dma_mask && *mmc_dev(host)->dma_mask)
limit = *mmc_dev(host)->dma_mask; 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,6 +133,8 @@ int mmc_init_queue(struct mmc_queue *mq, struct mmc_card *card, spinlock_t *lock
#ifdef CONFIG_MMC_BLOCK_BOUNCE #ifdef CONFIG_MMC_BLOCK_BOUNCE
if (host->max_hw_segs == 1) { if (host->max_hw_segs == 1) {
unsigned int bouncesz;
bouncesz = MMC_QUEUE_BOUNCESZ; bouncesz = MMC_QUEUE_BOUNCESZ;
if (bouncesz > host->max_req_size) 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,14 +157,14 @@ int mmc_init_queue(struct mmc_queue *mq, struct mmc_card *card, spinlock_t *lock
GFP_KERNEL); GFP_KERNEL);
if (!mq->sg) { if (!mq->sg) {
ret = -ENOMEM; ret = -ENOMEM;
goto free_bounce_buf; goto cleanup_queue;
} }
mq->bounce_sg = kmalloc(sizeof(struct scatterlist) * mq->bounce_sg = kmalloc(sizeof(struct scatterlist) *
bouncesz / 512, GFP_KERNEL); bouncesz / 512, GFP_KERNEL);
if (!mq->bounce_sg) { if (!mq->bounce_sg) {
ret = -ENOMEM; ret = -ENOMEM;
goto free_sg; goto cleanup_queue;
} }
} }
} }
...@@ -197,14 +198,13 @@ int mmc_init_queue(struct mmc_queue *mq, struct mmc_card *card, spinlock_t *lock ...@@ -197,14 +198,13 @@ int mmc_init_queue(struct mmc_queue *mq, struct mmc_card *card, spinlock_t *lock
if (mq->bounce_sg) if (mq->bounce_sg)
kfree(mq->bounce_sg); kfree(mq->bounce_sg);
mq->bounce_sg = NULL; mq->bounce_sg = NULL;
free_sg: cleanup_queue:
kfree(mq->sg); if (mq->sg)
kfree(mq->sg);
mq->sg = NULL; mq->sg = NULL;
free_bounce_buf:
if (mq->bounce_buf) if (mq->bounce_buf)
kfree(mq->bounce_buf); kfree(mq->bounce_buf);
mq->bounce_buf = NULL; mq->bounce_buf = NULL;
cleanup_queue:
blk_cleanup_queue(mq->queue); blk_cleanup_queue(mq->queue);
return ret; return ret;
} }
......
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
#define AT91_MCI_ERRORS (AT91_MCI_RINDE | AT91_MCI_RDIRE | AT91_MCI_RCRCE \ #define AT91_MCI_ERRORS (AT91_MCI_RINDE | AT91_MCI_RDIRE | AT91_MCI_RCRCE \
| AT91_MCI_RENDE | AT91_MCI_RTOE | AT91_MCI_DCRCE \ | AT91_MCI_RENDE | AT91_MCI_RTOE | AT91_MCI_DCRCE \
| AT91_MCI_DTOE | AT91_MCI_OVRE | AT91_MCI_UNRE) | AT91_MCI_DTOE | AT91_MCI_OVRE | AT91_MCI_UNRE)
#define at91_mci_read(host, reg) __raw_readl((host)->baseaddr + (reg)) #define at91_mci_read(host, reg) __raw_readl((host)->baseaddr + (reg))
#define at91_mci_write(host, reg, val) __raw_writel((val), (host)->baseaddr + (reg)) #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,15 +676,15 @@ static irqreturn_t at91_mci_irq(int irq, void *devid)
int_status = at91_mci_read(host, AT91_MCI_SR); int_status = at91_mci_read(host, AT91_MCI_SR);
int_mask = at91_mci_read(host, AT91_MCI_IMR); int_mask = at91_mci_read(host, AT91_MCI_IMR);
pr_debug("MCI irq: status = %08X, %08X, %08X\n", int_status, int_mask, pr_debug("MCI irq: status = %08X, %08X, %08X\n", int_status, int_mask,
int_status & int_mask); int_status & int_mask);
int_status = int_status & int_mask; int_status = int_status & int_mask;
if (int_status & AT91_MCI_ERRORS) { if (int_status & AT91_MCI_ERRORS) {
completed = 1; completed = 1;
if (int_status & AT91_MCI_UNRE) if (int_status & AT91_MCI_UNRE)
pr_debug("MMC: Underrun error\n"); pr_debug("MMC: Underrun error\n");
if (int_status & AT91_MCI_OVRE) if (int_status & AT91_MCI_OVRE)
......
...@@ -1266,7 +1266,7 @@ static int __devinit wbsd_alloc_mmc(struct device *dev) ...@@ -1266,7 +1266,7 @@ static int __devinit wbsd_alloc_mmc(struct device *dev)
return 0; return 0;
} }
static void __devexit wbsd_free_mmc(struct device *dev) static void wbsd_free_mmc(struct device *dev)
{ {
struct mmc_host *mmc; struct mmc_host *mmc;
struct wbsd_host *host; struct wbsd_host *host;
...@@ -1358,7 +1358,7 @@ static int __devinit wbsd_request_region(struct wbsd_host *host, int base) ...@@ -1358,7 +1358,7 @@ static int __devinit wbsd_request_region(struct wbsd_host *host, int base)
return 0; return 0;
} }
static void __devexit wbsd_release_regions(struct wbsd_host *host) static void wbsd_release_regions(struct wbsd_host *host)
{ {
if (host->base) if (host->base)
release_region(host->base, 8); release_region(host->base, 8);
...@@ -1434,7 +1434,7 @@ static void __devinit wbsd_request_dma(struct wbsd_host *host, int dma) ...@@ -1434,7 +1434,7 @@ static void __devinit wbsd_request_dma(struct wbsd_host *host, int dma)
"Falling back on FIFO.\n", dma); "Falling back on FIFO.\n", dma);
} }
static void __devexit wbsd_release_dma(struct wbsd_host *host) static void wbsd_release_dma(struct wbsd_host *host)
{ {
if (host->dma_addr) { if (host->dma_addr) {
dma_unmap_single(mmc_dev(host->mmc), host->dma_addr, 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,7 +1484,7 @@ static int __devinit wbsd_request_irq(struct wbsd_host *host, int irq)
return 0; return 0;
} }
static void __devexit wbsd_release_irq(struct wbsd_host *host) static void wbsd_release_irq(struct wbsd_host *host)
{ {
if (!host->irq) if (!host->irq)
return; return;
...@@ -1535,7 +1535,7 @@ static int __devinit wbsd_request_resources(struct wbsd_host *host, ...@@ -1535,7 +1535,7 @@ static int __devinit wbsd_request_resources(struct wbsd_host *host,
* Release all resources for the host. * Release all resources for the host.
*/ */
static void __devexit wbsd_release_resources(struct wbsd_host *host) static void wbsd_release_resources(struct wbsd_host *host)
{ {
wbsd_release_dma(host); wbsd_release_dma(host);
wbsd_release_irq(host); wbsd_release_irq(host);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment