aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/sh/shdma-base.c
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2013-07-02 11:45:55 -0400
committerVinod Koul <vinod.koul@intel.com>2013-08-27 04:54:19 -0400
commitc1c63a14f4f2419d093acd7164eccdff315baa86 (patch)
tree6e49bb37b43512da60e934f7ef47d484f807a59d /drivers/dma/sh/shdma-base.c
parentca8b387803072a16baf6d8090591b10bfdf4e253 (diff)
DMA: shdma: switch to managed resource allocation
Switch shdma to using devm_* managed functions for allocation of memory, requesting IRQs, mapping IO resources etc. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/sh/shdma-base.c')
-rw-r--r--drivers/dma/sh/shdma-base.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/dma/sh/shdma-base.c b/drivers/dma/sh/shdma-base.c
index 28ca36121631..c5ea256c2819 100644
--- a/drivers/dma/sh/shdma-base.c
+++ b/drivers/dma/sh/shdma-base.c
@@ -831,8 +831,8 @@ static irqreturn_t chan_irqt(int irq, void *dev)
831int shdma_request_irq(struct shdma_chan *schan, int irq, 831int shdma_request_irq(struct shdma_chan *schan, int irq,
832 unsigned long flags, const char *name) 832 unsigned long flags, const char *name)
833{ 833{
834 int ret = request_threaded_irq(irq, chan_irq, chan_irqt, 834 int ret = devm_request_threaded_irq(schan->dev, irq, chan_irq,
835 flags, name, schan); 835 chan_irqt, flags, name, schan);
836 836
837 schan->irq = ret < 0 ? ret : irq; 837 schan->irq = ret < 0 ? ret : irq;
838 838
@@ -840,13 +840,6 @@ int shdma_request_irq(struct shdma_chan *schan, int irq,
840} 840}
841EXPORT_SYMBOL(shdma_request_irq); 841EXPORT_SYMBOL(shdma_request_irq);
842 842
843void shdma_free_irq(struct shdma_chan *schan)
844{
845 if (schan->irq >= 0)
846 free_irq(schan->irq, schan);
847}
848EXPORT_SYMBOL(shdma_free_irq);
849
850void shdma_chan_probe(struct shdma_dev *sdev, 843void shdma_chan_probe(struct shdma_dev *sdev,
851 struct shdma_chan *schan, int id) 844 struct shdma_chan *schan, int id)
852{ 845{