hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/atm/solos-pci.c
....@@ -1,8 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Driver for the Solos PCI ADSL2+ card, designed to support Linux by
3
- * Traverse Technologies -- http://www.traverse.com.au/
4
+ * Traverse Technologies -- https://www.traverse.com.au/
45 * Xrio Limited -- http://www.xrio.com/
5
- *
66 *
77 * Copyright © 2008 Traverse Technologies
88 * Copyright © 2008 Intel Corporation
....@@ -10,15 +10,6 @@
1010 * Authors: Nathan Williams <nathan@traverse.com.au>
1111 * David Woodhouse <dwmw2@infradead.org>
1212 * Treker Chen <treker@xrio.com>
13
- *
14
- * This program is free software; you can redistribute it and/or
15
- * modify it under the terms of the GNU General Public License
16
- * version 2, as published by the Free Software Foundation.
17
- *
18
- * This program is distributed in the hope that it will be useful,
19
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
- * GNU General Public License for more details.
2213 */
2314
2415 #define DEBUG
....@@ -525,9 +516,8 @@
525516 static ssize_t geos_gpio_store(struct device *dev, struct device_attribute *attr,
526517 const char *buf, size_t count)
527518 {
528
- struct pci_dev *pdev = to_pci_dev(dev);
529519 struct geos_gpio_attr *gattr = container_of(attr, struct geos_gpio_attr, attr);
530
- struct solos_card *card = pci_get_drvdata(pdev);
520
+ struct solos_card *card = dev_get_drvdata(dev);
531521 uint32_t data32;
532522
533523 if (count != 1 && (count != 2 || buf[1] != '\n'))
....@@ -551,9 +541,8 @@
551541 static ssize_t geos_gpio_show(struct device *dev, struct device_attribute *attr,
552542 char *buf)
553543 {
554
- struct pci_dev *pdev = to_pci_dev(dev);
555544 struct geos_gpio_attr *gattr = container_of(attr, struct geos_gpio_attr, attr);
556
- struct solos_card *card = pci_get_drvdata(pdev);
545
+ struct solos_card *card = dev_get_drvdata(dev);
557546 uint32_t data32;
558547
559548 data32 = ioread32(card->config_regs + GPIO_STATUS);
....@@ -565,9 +554,8 @@
565554 static ssize_t hardware_show(struct device *dev, struct device_attribute *attr,
566555 char *buf)
567556 {
568
- struct pci_dev *pdev = to_pci_dev(dev);
569557 struct geos_gpio_attr *gattr = container_of(attr, struct geos_gpio_attr, attr);
570
- struct solos_card *card = pci_get_drvdata(pdev);
558
+ struct solos_card *card = dev_get_drvdata(dev);
571559 uint32_t data32;
572560
573561 data32 = ioread32(card->config_regs + GPIO_STATUS);
....@@ -1191,8 +1179,6 @@
11911179 .open = popen,
11921180 .close = pclose,
11931181 .ioctl = NULL,
1194
- .getsockopt = NULL,
1195
- .setsockopt = NULL,
11961182 .send = psend,
11971183 .send_oam = NULL,
11981184 .phy_put = NULL,