Merge tag 'acpi-5.15-rc1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
[linux-2.6-microblaze.git] / drivers / dma / ep93xx_dma.c
index 87a2460..98f9ee7 100644 (file)
@@ -745,9 +745,9 @@ static void ep93xx_dma_advance_work(struct ep93xx_dma_chan *edmac)
        spin_unlock_irqrestore(&edmac->lock, flags);
 }
 
-static void ep93xx_dma_tasklet(unsigned long data)
+static void ep93xx_dma_tasklet(struct tasklet_struct *t)
 {
-       struct ep93xx_dma_chan *edmac = (struct ep93xx_dma_chan *)data;
+       struct ep93xx_dma_chan *edmac = from_tasklet(edmac, t, tasklet);
        struct ep93xx_dma_desc *desc, *d;
        struct dmaengine_desc_callback cb;
        LIST_HEAD(list);
@@ -897,7 +897,7 @@ static int ep93xx_dma_alloc_chan_resources(struct dma_chan *chan)
        if (data && data->name)
                name = data->name;
 
-       ret = clk_enable(edmac->clk);
+       ret = clk_prepare_enable(edmac->clk);
        if (ret)
                return ret;
 
@@ -936,7 +936,7 @@ static int ep93xx_dma_alloc_chan_resources(struct dma_chan *chan)
 fail_free_irq:
        free_irq(edmac->irq, edmac);
 fail_clk_disable:
-       clk_disable(edmac->clk);
+       clk_disable_unprepare(edmac->clk);
 
        return ret;
 }
@@ -969,7 +969,7 @@ static void ep93xx_dma_free_chan_resources(struct dma_chan *chan)
        list_for_each_entry_safe(desc, d, &list, node)
                kfree(desc);
 
-       clk_disable(edmac->clk);
+       clk_disable_unprepare(edmac->clk);
        free_irq(edmac->irq, edmac);
 }
 
@@ -1353,8 +1353,7 @@ static int __init ep93xx_dma_probe(struct platform_device *pdev)
                INIT_LIST_HEAD(&edmac->active);
                INIT_LIST_HEAD(&edmac->queue);
                INIT_LIST_HEAD(&edmac->free_list);
-               tasklet_init(&edmac->tasklet, ep93xx_dma_tasklet,
-                            (unsigned long)edmac);
+               tasklet_setup(&edmac->tasklet, ep93xx_dma_tasklet);
 
                list_add_tail(&edmac->chan.device_node,
                              &dma_dev->channels);