.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * ngene.c: nGene PCIe bridge driver |
---|
3 | 4 | * |
---|
.. | .. |
---|
7 | 8 | * Modifications for new nGene firmware, |
---|
8 | 9 | * support for EEPROM-copying, |
---|
9 | 10 | * support for new dual DVB-S2 card prototype |
---|
10 | | - * |
---|
11 | | - * |
---|
12 | | - * This program is free software; you can redistribute it and/or |
---|
13 | | - * modify it under the terms of the GNU General Public License |
---|
14 | | - * version 2 only, as published by the Free Software Foundation. |
---|
15 | | - * |
---|
16 | | - * |
---|
17 | | - * This program is distributed in the hope that it will be useful, |
---|
18 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
19 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
20 | | - * GNU General Public License for more details. |
---|
21 | | - * |
---|
22 | | - * To obtain the license, point your browser to |
---|
23 | | - * http://www.gnu.org/copyleft/gpl.html |
---|
24 | 11 | */ |
---|
25 | 12 | |
---|
26 | 13 | #include <linux/module.h> |
---|
.. | .. |
---|
63 | 50 | /* nGene interrupt handler **************************************************/ |
---|
64 | 51 | /****************************************************************************/ |
---|
65 | 52 | |
---|
66 | | -static void event_tasklet(unsigned long data) |
---|
| 53 | +static void event_tasklet(struct tasklet_struct *t) |
---|
67 | 54 | { |
---|
68 | | - struct ngene *dev = (struct ngene *)data; |
---|
| 55 | + struct ngene *dev = from_tasklet(dev, t, event_tasklet); |
---|
69 | 56 | |
---|
70 | 57 | while (dev->EventQueueReadIndex != dev->EventQueueWriteIndex) { |
---|
71 | 58 | struct EVENT_BUFFER Event = |
---|
.. | .. |
---|
81 | 68 | } |
---|
82 | 69 | } |
---|
83 | 70 | |
---|
84 | | -static void demux_tasklet(unsigned long data) |
---|
| 71 | +static void demux_tasklet(struct tasklet_struct *t) |
---|
85 | 72 | { |
---|
86 | | - struct ngene_channel *chan = (struct ngene_channel *)data; |
---|
| 73 | + struct ngene_channel *chan = from_tasklet(chan, t, demux_tasklet); |
---|
87 | 74 | struct device *pdev = &chan->dev->pci_dev->dev; |
---|
88 | 75 | struct SBufferHeader *Cur = chan->nextBuffer; |
---|
89 | 76 | |
---|
.. | .. |
---|
867 | 854 | if (!Head) |
---|
868 | 855 | return -ENOMEM; |
---|
869 | 856 | |
---|
870 | | - memset(Head, 0, MemSize); |
---|
871 | | - |
---|
872 | 857 | PARingBufferCur = PARingBufferHead; |
---|
873 | 858 | Cur = Head; |
---|
874 | 859 | |
---|
.. | .. |
---|
919 | 904 | PASCListMem = tmp; |
---|
920 | 905 | if (SCListMem == NULL) |
---|
921 | 906 | return -ENOMEM; |
---|
922 | | - |
---|
923 | | - memset(SCListMem, 0, SCListMemSize); |
---|
924 | 907 | |
---|
925 | 908 | pRingBuffer->SCListMem = SCListMem; |
---|
926 | 909 | pRingBuffer->PASCListMem = PASCListMem; |
---|
.. | .. |
---|
1014 | 997 | /* Point to first buffer entry */ |
---|
1015 | 998 | struct SBufferHeader *Cur = pRingBuffer->Head; |
---|
1016 | 999 | int i; |
---|
1017 | | - /* Loop thru all buffer and set Buffer 2 pointers to TSIdlebuffer */ |
---|
| 1000 | + /* Loop through all buffer and set Buffer 2 pointers to TSIdlebuffer */ |
---|
1018 | 1001 | for (i = 0; i < n; i++) { |
---|
1019 | 1002 | Cur->Buffer2 = pIdleBuffer->Head->Buffer1; |
---|
1020 | 1003 | Cur->scList2 = pIdleBuffer->Head->scList1; |
---|
.. | .. |
---|
1198 | 1181 | struct device *pdev = &dev->pci_dev->dev; |
---|
1199 | 1182 | int i; |
---|
1200 | 1183 | |
---|
1201 | | - tasklet_init(&dev->event_tasklet, event_tasklet, (unsigned long)dev); |
---|
| 1184 | + tasklet_setup(&dev->event_tasklet, event_tasklet); |
---|
1202 | 1185 | |
---|
1203 | 1186 | memset_io(dev->iomem + 0xc000, 0x00, 0x220); |
---|
1204 | 1187 | memset_io(dev->iomem + 0xc400, 0x00, 0x100); |
---|
.. | .. |
---|
1462 | 1445 | struct ngene_info *ni = dev->card_info; |
---|
1463 | 1446 | int io = ni->io_type[nr]; |
---|
1464 | 1447 | |
---|
1465 | | - tasklet_init(&chan->demux_tasklet, demux_tasklet, (unsigned long)chan); |
---|
| 1448 | + tasklet_setup(&chan->demux_tasklet, demux_tasklet); |
---|
1466 | 1449 | chan->users = 0; |
---|
1467 | 1450 | chan->type = io; |
---|
1468 | 1451 | chan->mode = chan->type; /* for now only one mode */ |
---|