forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-14 bedbef8ad3e75a304af6361af235302bcc61d06b
kernel/drivers/dma/ppc4xx/adma.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Copyright (C) 2006-2009 DENX Software Engineering.
34 *
....@@ -5,19 +6,6 @@
56 *
67 * Further porting to arch/powerpc by
78 * Anatolij Gustschin <agust@denx.de>
8
- *
9
- * This program is free software; you can redistribute it and/or modify it
10
- * under the terms of the GNU General Public License as published by the Free
11
- * Software Foundation; either version 2 of the License, or (at your option)
12
- * any later version.
13
- *
14
- * This program is distributed in the hope that it will be useful, but WITHOUT
15
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
17
- * more details.
18
- *
19
- * The full GNU General Public License is included in this distribution in the
20
- * file called COPYING.
219 */
2210
2311 /*
....@@ -1672,9 +1660,9 @@
16721660 /**
16731661 * ppc440spe_adma_tasklet - clean up watch-dog initiator
16741662 */
1675
-static void ppc440spe_adma_tasklet(unsigned long data)
1663
+static void ppc440spe_adma_tasklet(struct tasklet_struct *t)
16761664 {
1677
- struct ppc440spe_adma_chan *chan = (struct ppc440spe_adma_chan *) data;
1665
+ struct ppc440spe_adma_chan *chan = from_tasklet(chan, t, irq_tasklet);
16781666
16791667 spin_lock_nested(&chan->lock, SINGLE_DEPTH_NESTING);
16801668 __ppc440spe_adma_slot_cleanup(chan);
....@@ -4153,8 +4141,7 @@
41534141 chan->common.device = &adev->common;
41544142 dma_cookie_init(&chan->common);
41554143 list_add_tail(&chan->common.device_node, &adev->common.channels);
4156
- tasklet_init(&chan->irq_tasklet, ppc440spe_adma_tasklet,
4157
- (unsigned long)chan);
4144
+ tasklet_setup(&chan->irq_tasklet, ppc440spe_adma_tasklet);
41584145
41594146 /* allocate and map helper pages for async validation or
41604147 * async_mult/async_sum_product operations on DMA0/1.
....@@ -4315,7 +4302,7 @@
43154302 for (i = 0; i < PPC440SPE_ADMA_ENGINES_NUM; i++) {
43164303 if (ppc440spe_adma_devices[i] == -1)
43174304 continue;
4318
- size += snprintf(buf + size, PAGE_SIZE - size,
4305
+ size += scnprintf(buf + size, PAGE_SIZE - size,
43194306 "PPC440SP(E)-ADMA.%d: %s\n", i,
43204307 ppc_adma_errors[ppc440spe_adma_devices[i]]);
43214308 }