From: Heiner Kallweit <hkallweit1@gmail.com>
To: Bjorn Helgaas <bhelgaas@google.com>
Cc: "linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: [PATCH 3/3] r8169: use new helper pci_dev_id
Date: Fri, 19 Apr 2019 20:29:49 +0200 [thread overview]
Message-ID: <ddcac887-95f5-c6b7-c27b-33920edd9ca1@gmail.com> (raw)
In-Reply-To: <b193514c-23d1-e090-7ddb-40371595f3a7@gmail.com>
Use new helper pci_dev_id() to simplify the code.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
drivers/net/ethernet/realtek/r8169.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index efaea1a0a..ae476fe8d 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -7020,8 +7020,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;
--
2.21.0
next prev parent reply other threads:[~2019-04-19 18:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-19 18:27 [PATCH 0/3] PCI: add help pci_dev_id Heiner Kallweit
2019-04-19 18:28 ` [PATCH 1/3] PCI: add helper pci_dev_id Heiner Kallweit
2019-04-19 18:29 ` [PATCH 2/3] PCI: use " Heiner Kallweit
2019-04-19 18:29 ` Heiner Kallweit [this message]
2019-04-19 22:13 ` [PATCH 0/3] PCI: add help pci_dev_id David Miller
2019-04-22 13:20 ` Bjorn Helgaas
2019-04-23 4:09 ` David Miller
2019-04-23 6:05 ` Heiner Kallweit
-- strict thread matches above, loose matches on Subject: below --
2019-04-19 11:08 Heiner Kallweit
2019-04-19 11:10 ` [PATCH 3/3] r8169: use new helper pci_dev_id Heiner Kallweit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ddcac887-95f5-c6b7-c27b-33920edd9ca1@gmail.com \
--to=hkallweit1@gmail.com \
--cc=bhelgaas@google.com \
--cc=linux-pci@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox