diff options
author | H. Nikolaus Schaller <hns@goldelico.com> | 2013-10-14 08:06:24 +0200 |
---|---|---|
committer | H. Nikolaus Schaller <hns@goldelico.com> | 2013-10-14 10:15:39 +0200 |
commit | ee9bf2e547f224b68b3a4cc08ad7eb919c9eca3f (patch) | |
tree | 785af9511c2622f143e632e2e1b748514430684f /drivers/dma | |
parent | 71ef4d7a1a378901bb4a60ea1cdc2542a4d47f42 (diff) | |
parent | 61e6cfa80de5760bbe406f4e815b7739205754d2 (diff) | |
download | kernel_goldelico_gta04-ee9bf2e547f224b68b3a4cc08ad7eb919c9eca3f.zip kernel_goldelico_gta04-ee9bf2e547f224b68b3a4cc08ad7eb919c9eca3f.tar.gz kernel_goldelico_gta04-ee9bf2e547f224b68b3a4cc08ad7eb919c9eca3f.tar.bz2 |
Merge remote-tracking branch 'linus/master' for 3.12-rc5
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/edma.c | 1 | ||||
-rw-r--r-- | drivers/dma/sh/rcar-hpbdma.c | 9 |
2 files changed, 6 insertions, 4 deletions
diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c index 098a8da..3519111 100644 --- a/drivers/dma/edma.c +++ b/drivers/dma/edma.c @@ -306,6 +306,7 @@ static struct dma_async_tx_descriptor *edma_prep_slave_sg( EDMA_SLOT_ANY); if (echan->slot[i] < 0) { dev_err(dev, "Failed to allocate slot\n"); + kfree(edesc); return NULL; } } diff --git a/drivers/dma/sh/rcar-hpbdma.c b/drivers/dma/sh/rcar-hpbdma.c index 45a5202..ebad845 100644 --- a/drivers/dma/sh/rcar-hpbdma.c +++ b/drivers/dma/sh/rcar-hpbdma.c @@ -93,6 +93,7 @@ struct hpb_dmae_chan { void __iomem *base; const struct hpb_dmae_slave_config *cfg; char dev_id[16]; /* unique name per DMAC of channel */ + dma_addr_t slave_addr; }; struct hpb_dmae_device { @@ -432,7 +433,6 @@ hpb_dmae_alloc_chan_resources(struct hpb_dmae_chan *hpb_chan, hpb_chan->xfer_mode = XFER_DOUBLE; } else { dev_err(hpb_chan->shdma_chan.dev, "DCR setting error"); - shdma_free_irq(&hpb_chan->shdma_chan); return -EINVAL; } @@ -446,7 +446,8 @@ hpb_dmae_alloc_chan_resources(struct hpb_dmae_chan *hpb_chan, return 0; } -static int hpb_dmae_set_slave(struct shdma_chan *schan, int slave_id, bool try) +static int hpb_dmae_set_slave(struct shdma_chan *schan, int slave_id, + dma_addr_t slave_addr, bool try) { struct hpb_dmae_chan *chan = to_chan(schan); const struct hpb_dmae_slave_config *sc = @@ -457,6 +458,7 @@ static int hpb_dmae_set_slave(struct shdma_chan *schan, int slave_id, bool try) if (try) return 0; chan->cfg = sc; + chan->slave_addr = slave_addr ? : sc->addr; return hpb_dmae_alloc_chan_resources(chan, sc); } @@ -468,7 +470,7 @@ static dma_addr_t hpb_dmae_slave_addr(struct shdma_chan *schan) { struct hpb_dmae_chan *chan = to_chan(schan); - return chan->cfg->addr; + return chan->slave_addr; } static struct shdma_desc *hpb_dmae_embedded_desc(void *buf, int i) @@ -614,7 +616,6 @@ static void hpb_dmae_chan_remove(struct hpb_dmae_device *hpbdev) shdma_for_each_chan(schan, &hpbdev->shdma_dev, i) { BUG_ON(!schan); - shdma_free_irq(schan); shdma_chan_remove(schan); } dma_dev->chancnt = 0; |