hc
2024-05-10 23fa18eaa71266feff7ba8d83022d9e1cc83c65a
kernel/drivers/net/wireless/ralink/rt2x00/rt2400pci.c
....@@ -1,19 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 Copyright (C) 2004 - 2009 Ivo van Doorn <IvDoorn@gmail.com>
34 <http://rt2x00.serialmonkey.com>
45
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/>.
176 */
187
198 /*
....@@ -1302,7 +1291,7 @@
13021291 break;
13031292 case 2: /* Failure, excessive retries */
13041293 __set_bit(TXDONE_EXCESSIVE_RETRY, &txdesc.flags);
1305
- /* Don't break, this is a failed frame! */
1294
+ fallthrough; /* this is a failed frame! */
13061295 default: /* Failure */
13071296 __set_bit(TXDONE_FAILURE, &txdesc.flags);
13081297 }
....@@ -1330,9 +1319,10 @@
13301319 spin_unlock_irq(&rt2x00dev->irqmask_lock);
13311320 }
13321321
1333
-static void rt2400pci_txstatus_tasklet(unsigned long data)
1322
+static void rt2400pci_txstatus_tasklet(struct tasklet_struct *t)
13341323 {
1335
- struct rt2x00_dev *rt2x00dev = (struct rt2x00_dev *)data;
1324
+ struct rt2x00_dev *rt2x00dev = from_tasklet(rt2x00dev, t,
1325
+ txstatus_tasklet);
13361326 u32 reg;
13371327
13381328 /*
....@@ -1358,17 +1348,18 @@
13581348 }
13591349 }
13601350
1361
-static void rt2400pci_tbtt_tasklet(unsigned long data)
1351
+static void rt2400pci_tbtt_tasklet(struct tasklet_struct *t)
13621352 {
1363
- struct rt2x00_dev *rt2x00dev = (struct rt2x00_dev *)data;
1353
+ struct rt2x00_dev *rt2x00dev = from_tasklet(rt2x00dev, t, tbtt_tasklet);
13641354 rt2x00lib_beacondone(rt2x00dev);
13651355 if (test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags))
13661356 rt2400pci_enable_interrupt(rt2x00dev, CSR8_TBCN_EXPIRE);
13671357 }
13681358
1369
-static void rt2400pci_rxdone_tasklet(unsigned long data)
1359
+static void rt2400pci_rxdone_tasklet(struct tasklet_struct *t)
13701360 {
1371
- struct rt2x00_dev *rt2x00dev = (struct rt2x00_dev *)data;
1361
+ struct rt2x00_dev *rt2x00dev = from_tasklet(rt2x00dev, t,
1362
+ rxdone_tasklet);
13721363 if (rt2x00mmio_rxdone(rt2x00dev))
13731364 tasklet_schedule(&rt2x00dev->rxdone_tasklet);
13741365 else if (test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags))
....@@ -1845,8 +1836,7 @@
18451836 .id_table = rt2400pci_device_table,
18461837 .probe = rt2400pci_probe,
18471838 .remove = rt2x00pci_remove,
1848
- .suspend = rt2x00pci_suspend,
1849
- .resume = rt2x00pci_resume,
1839
+ .driver.pm = &rt2x00pci_pm_ops,
18501840 };
18511841
18521842 module_pci_driver(rt2400pci_driver);