summaryrefslogtreecommitdiffstats
path: root/drivers/dma
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2012-11-15 16:11:18 +0100
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2012-11-20 15:59:00 +0100
commit88eb92cb4d0a1520c2f9a653fba0f838871af3ab (patch)
tree91bd04cfdada4c9737d62ab11f11e78beadc8a06 /drivers/dma
parentb503fa01990f6875640339d8f4ba98dbc068f821 (diff)
downloadop-kernel-dev-88eb92cb4d0a1520c2f9a653fba0f838871af3ab.zip
op-kernel-dev-88eb92cb4d0a1520c2f9a653fba0f838871af3ab.tar.gz
dma: mv_xor: add missing free_irq() call
Even though the driver cannot be unloaded at the moment, it is still good to properly free the IRQ handlers in the channel removal function. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/mv_xor.c5
-rw-r--r--drivers/dma/mv_xor.h1
2 files changed, 5 insertions, 1 deletions
diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c
index ec741b4..d48245c 100644
--- a/drivers/dma/mv_xor.c
+++ b/drivers/dma/mv_xor.c
@@ -1082,6 +1082,8 @@ static int mv_xor_channel_remove(struct mv_xor_chan *mv_chan)
list_del(&chan->device_node);
}
+ free_irq(mv_chan->irq, mv_chan);
+
return 0;
}
@@ -1101,6 +1103,7 @@ mv_xor_channel_add(struct mv_xor_device *xordev,
}
mv_chan->idx = idx;
+ mv_chan->irq = irq;
dma_dev = &mv_chan->dmadev;
@@ -1147,7 +1150,7 @@ mv_xor_channel_add(struct mv_xor_device *xordev,
/* clear errors before enabling interrupts */
mv_xor_device_clear_err_status(mv_chan);
- ret = devm_request_irq(&pdev->dev, irq,
+ ret = devm_request_irq(&pdev->dev, mv_chan->irq,
mv_xor_interrupt_handler,
0, dev_name(&pdev->dev), mv_chan);
if (ret)
diff --git a/drivers/dma/mv_xor.h b/drivers/dma/mv_xor.h
index 698b448..1704328 100644
--- a/drivers/dma/mv_xor.h
+++ b/drivers/dma/mv_xor.h
@@ -81,6 +81,7 @@ struct mv_xor_chan {
spinlock_t lock; /* protects the descriptor slot pool */
void __iomem *mmr_base;
unsigned int idx;
+ int irq;
enum dma_transaction_type current_type;
struct list_head chain;
struct list_head completed_slots;
OpenPOWER on IntegriCloud