summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/realtek
diff options
context:
space:
mode:
authorHeiner Kallweit <hkallweit1@gmail.com>2019-04-24 22:13:25 +0300
committerBjorn Helgaas <bhelgaas@google.com>2019-04-30 00:12:14 +0300
commita195016a5981376721a7770e1d01be676540ead8 (patch)
treed2355d0ce3d9537d70a6ab57591813ca9bd84414 /drivers/net/ethernet/realtek
parent4e544bac8267f65a0bf06aed1bde9964da4812ed (diff)
downloadlinux-a195016a5981376721a7770e1d01be676540ead8.tar.xz
r8169: use pci_dev_id() helper
Use new helper pci_dev_id() to simplify the code. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/realtek')
-rw-r--r--drivers/net/ethernet/realtek/r8169.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index c29dde064078..65eb095f94b8 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -7182,8 +7182,7 @@ static int r8169_mdio_register(struct rtl8169_private *tp)
new_bus->priv = tp;
new_bus->parent = &pdev->dev;
new_bus->irq[0] = PHY_IGNORE_INTERRUPT;
- snprintf(new_bus->id, MII_BUS_ID_SIZE, "r8169-%x",
- PCI_DEVID(pdev->bus->number, pdev->devfn));
+ snprintf(new_bus->id, MII_BUS_ID_SIZE, "r8169-%x", pci_dev_id(pdev));
new_bus->read = r8169_mdio_read_reg;
new_bus->write = r8169_mdio_write_reg;