| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * 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/ |
|---|
| 4 | 5 | * Xrio Limited -- http://www.xrio.com/ |
|---|
| 5 | | - * |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Copyright © 2008 Traverse Technologies |
|---|
| 8 | 8 | * Copyright © 2008 Intel Corporation |
|---|
| .. | .. |
|---|
| 10 | 10 | * Authors: Nathan Williams <nathan@traverse.com.au> |
|---|
| 11 | 11 | * David Woodhouse <dwmw2@infradead.org> |
|---|
| 12 | 12 | * 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. |
|---|
| 22 | 13 | */ |
|---|
| 23 | 14 | |
|---|
| 24 | 15 | #define DEBUG |
|---|
| .. | .. |
|---|
| 525 | 516 | static ssize_t geos_gpio_store(struct device *dev, struct device_attribute *attr, |
|---|
| 526 | 517 | const char *buf, size_t count) |
|---|
| 527 | 518 | { |
|---|
| 528 | | - struct pci_dev *pdev = to_pci_dev(dev); |
|---|
| 529 | 519 | 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); |
|---|
| 531 | 521 | uint32_t data32; |
|---|
| 532 | 522 | |
|---|
| 533 | 523 | if (count != 1 && (count != 2 || buf[1] != '\n')) |
|---|
| .. | .. |
|---|
| 551 | 541 | static ssize_t geos_gpio_show(struct device *dev, struct device_attribute *attr, |
|---|
| 552 | 542 | char *buf) |
|---|
| 553 | 543 | { |
|---|
| 554 | | - struct pci_dev *pdev = to_pci_dev(dev); |
|---|
| 555 | 544 | 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); |
|---|
| 557 | 546 | uint32_t data32; |
|---|
| 558 | 547 | |
|---|
| 559 | 548 | data32 = ioread32(card->config_regs + GPIO_STATUS); |
|---|
| .. | .. |
|---|
| 565 | 554 | static ssize_t hardware_show(struct device *dev, struct device_attribute *attr, |
|---|
| 566 | 555 | char *buf) |
|---|
| 567 | 556 | { |
|---|
| 568 | | - struct pci_dev *pdev = to_pci_dev(dev); |
|---|
| 569 | 557 | 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); |
|---|
| 571 | 559 | uint32_t data32; |
|---|
| 572 | 560 | |
|---|
| 573 | 561 | data32 = ioread32(card->config_regs + GPIO_STATUS); |
|---|
| .. | .. |
|---|
| 1191 | 1179 | .open = popen, |
|---|
| 1192 | 1180 | .close = pclose, |
|---|
| 1193 | 1181 | .ioctl = NULL, |
|---|
| 1194 | | - .getsockopt = NULL, |
|---|
| 1195 | | - .setsockopt = NULL, |
|---|
| 1196 | 1182 | .send = psend, |
|---|
| 1197 | 1183 | .send_oam = NULL, |
|---|
| 1198 | 1184 | .phy_put = NULL, |
|---|