.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | Copyright (C) 2004 - 2009 Ivo van Doorn <IvDoorn@gmail.com> |
---|
3 | 4 | <http://rt2x00.serialmonkey.com> |
---|
4 | 5 | |
---|
5 | | - This program is free software; you can redistribute it and/or modify |
---|
6 | | - it under the terms of the GNU General Public License as published by |
---|
7 | | - the Free Software Foundation; either version 2 of the License, or |
---|
8 | | - (at your option) any later version. |
---|
9 | | - |
---|
10 | | - This program is distributed in the hope that it will be useful, |
---|
11 | | - but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
12 | | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
13 | | - GNU General Public License for more details. |
---|
14 | | - |
---|
15 | | - You should have received a copy of the GNU General Public License |
---|
16 | | - along with this program; if not, see <http://www.gnu.org/licenses/>. |
---|
17 | 6 | */ |
---|
18 | 7 | |
---|
19 | 8 | /* |
---|
.. | .. |
---|
1430 | 1419 | break; |
---|
1431 | 1420 | case 2: /* Failure, excessive retries */ |
---|
1432 | 1421 | __set_bit(TXDONE_EXCESSIVE_RETRY, &txdesc.flags); |
---|
1433 | | - /* Don't break, this is a failed frame! */ |
---|
| 1422 | + fallthrough; /* this is a failed frame! */ |
---|
1434 | 1423 | default: /* Failure */ |
---|
1435 | 1424 | __set_bit(TXDONE_FAILURE, &txdesc.flags); |
---|
1436 | 1425 | } |
---|
.. | .. |
---|
1458 | 1447 | spin_unlock_irq(&rt2x00dev->irqmask_lock); |
---|
1459 | 1448 | } |
---|
1460 | 1449 | |
---|
1461 | | -static void rt2500pci_txstatus_tasklet(unsigned long data) |
---|
| 1450 | +static void rt2500pci_txstatus_tasklet(struct tasklet_struct *t) |
---|
1462 | 1451 | { |
---|
1463 | | - struct rt2x00_dev *rt2x00dev = (struct rt2x00_dev *)data; |
---|
| 1452 | + struct rt2x00_dev *rt2x00dev = from_tasklet(rt2x00dev, t, |
---|
| 1453 | + txstatus_tasklet); |
---|
1464 | 1454 | u32 reg; |
---|
1465 | 1455 | |
---|
1466 | 1456 | /* |
---|
.. | .. |
---|
1486 | 1476 | } |
---|
1487 | 1477 | } |
---|
1488 | 1478 | |
---|
1489 | | -static void rt2500pci_tbtt_tasklet(unsigned long data) |
---|
| 1479 | +static void rt2500pci_tbtt_tasklet(struct tasklet_struct *t) |
---|
1490 | 1480 | { |
---|
1491 | | - struct rt2x00_dev *rt2x00dev = (struct rt2x00_dev *)data; |
---|
| 1481 | + struct rt2x00_dev *rt2x00dev = from_tasklet(rt2x00dev, t, tbtt_tasklet); |
---|
1492 | 1482 | rt2x00lib_beacondone(rt2x00dev); |
---|
1493 | 1483 | if (test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags)) |
---|
1494 | 1484 | rt2500pci_enable_interrupt(rt2x00dev, CSR8_TBCN_EXPIRE); |
---|
1495 | 1485 | } |
---|
1496 | 1486 | |
---|
1497 | | -static void rt2500pci_rxdone_tasklet(unsigned long data) |
---|
| 1487 | +static void rt2500pci_rxdone_tasklet(struct tasklet_struct *t) |
---|
1498 | 1488 | { |
---|
1499 | | - struct rt2x00_dev *rt2x00dev = (struct rt2x00_dev *)data; |
---|
| 1489 | + struct rt2x00_dev *rt2x00dev = from_tasklet(rt2x00dev, t, |
---|
| 1490 | + rxdone_tasklet); |
---|
1500 | 1491 | if (rt2x00mmio_rxdone(rt2x00dev)) |
---|
1501 | 1492 | tasklet_schedule(&rt2x00dev->rxdone_tasklet); |
---|
1502 | 1493 | else if (test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags)) |
---|
.. | .. |
---|
2143 | 2134 | .id_table = rt2500pci_device_table, |
---|
2144 | 2135 | .probe = rt2500pci_probe, |
---|
2145 | 2136 | .remove = rt2x00pci_remove, |
---|
2146 | | - .suspend = rt2x00pci_suspend, |
---|
2147 | | - .resume = rt2x00pci_resume, |
---|
| 2137 | + .driver.pm = &rt2x00pci_pm_ops, |
---|
2148 | 2138 | }; |
---|
2149 | 2139 | |
---|
2150 | 2140 | module_pci_driver(rt2500pci_driver); |
---|