diff options
Diffstat (limited to 'drivers/dma/fsl_raid.c')
| -rw-r--r-- | drivers/dma/fsl_raid.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/dma/fsl_raid.c b/drivers/dma/fsl_raid.c index 493dc6c59d1d..6aa97e258a55 100644 --- a/drivers/dma/fsl_raid.c +++ b/drivers/dma/fsl_raid.c @@ -60,9 +60,10 @@ */ #include <linux/interrupt.h> #include <linux/module.h> +#include <linux/of.h> #include <linux/of_irq.h> -#include <linux/of_address.h> #include <linux/of_platform.h> +#include <linux/platform_device.h> #include <linux/dma-mapping.h> #include <linux/dmapool.h> #include <linux/dmaengine.h> @@ -154,17 +155,15 @@ static void fsl_re_cleanup_descs(struct fsl_re_chan *re_chan) fsl_re_issue_pending(&re_chan->chan); } -static void fsl_re_dequeue(unsigned long data) +static void fsl_re_dequeue(struct tasklet_struct *t) { - struct fsl_re_chan *re_chan; + struct fsl_re_chan *re_chan = from_tasklet(re_chan, t, irqtask); struct fsl_re_desc *desc, *_desc; struct fsl_re_hw_desc *hwdesc; unsigned long flags; unsigned int count, oub_count; int found; - re_chan = dev_get_drvdata((struct device *)data); - fsl_re_cleanup_descs(re_chan); spin_lock_irqsave(&re_chan->desc_lock, flags); @@ -671,7 +670,7 @@ static int fsl_re_chan_probe(struct platform_device *ofdev, snprintf(chan->name, sizeof(chan->name), "re_jr%02d", q); chandev = &chan_ofdev->dev; - tasklet_init(&chan->irqtask, fsl_re_dequeue, (unsigned long)chandev); + tasklet_setup(&chan->irqtask, fsl_re_dequeue); ret = request_irq(chan->irq, fsl_re_isr, 0, chan->name, chandev); if (ret) { @@ -858,7 +857,7 @@ static void fsl_re_remove_chan(struct fsl_re_chan *chan) chan->oub_phys_addr); } -static int fsl_re_remove(struct platform_device *ofdev) +static void fsl_re_remove(struct platform_device *ofdev) { struct fsl_re_drv_private *re_priv; struct device *dev; @@ -873,8 +872,6 @@ static int fsl_re_remove(struct platform_device *ofdev) /* Unregister the driver */ dma_async_device_unregister(&re_priv->dma_dev); - - return 0; } static const struct of_device_id fsl_re_ids[] = { |
