From: Andrey Smirnov <andrew.smirnov@gmail.com>
To: barebox@lists.infradead.org
Cc: Andrey Smirnov <andrew.smirnov@gmail.com>
Subject: [PATCH 3/8] drivers: Make use of device_pci_driver()
Date: Mon, 11 Feb 2019 22:40:17 -0800 [thread overview]
Message-ID: <20190212064022.26154-4-andrew.smirnov@gmail.com> (raw)
In-Reply-To: <20190212064022.26154-1-andrew.smirnov@gmail.com>
Replace all of the generic PCI boilerplate with device_pci_driver().
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
drivers/net/e1000/main.c | 7 +------
drivers/net/rtl8139.c | 7 +------
drivers/net/rtl8169.c | 7 +------
drivers/usb/host/xhci-pci.c | 7 +------
4 files changed, 4 insertions(+), 24 deletions(-)
diff --git a/drivers/net/e1000/main.c b/drivers/net/e1000/main.c
index 774e3d030..f67c5d867 100644
--- a/drivers/net/e1000/main.c
+++ b/drivers/net/e1000/main.c
@@ -3713,9 +3713,4 @@ static struct pci_driver e1000_eth_driver = {
.probe = e1000_probe,
.remove = e1000_remove,
};
-
-static int e1000_driver_init(void)
-{
- return pci_register_driver(&e1000_eth_driver);
-}
-device_initcall(e1000_driver_init);
+device_pci_driver(e1000_eth_driver);
diff --git a/drivers/net/rtl8139.c b/drivers/net/rtl8139.c
index cfa34a2f2..e1c57e6b7 100644
--- a/drivers/net/rtl8139.c
+++ b/drivers/net/rtl8139.c
@@ -594,9 +594,4 @@ static struct pci_driver rtl8139_eth_driver = {
.id_table = rtl8139_pci_tbl,
.probe = rtl8139_probe,
};
-
-static int rtl8139_init(void)
-{
- return pci_register_driver(&rtl8139_eth_driver);
-}
-device_initcall(rtl8139_init);
+device_pci_driver(rtl8139_eth_driver);
diff --git a/drivers/net/rtl8169.c b/drivers/net/rtl8169.c
index ba257509e..4e9823d42 100644
--- a/drivers/net/rtl8169.c
+++ b/drivers/net/rtl8169.c
@@ -544,9 +544,4 @@ static struct pci_driver rtl8169_eth_driver = {
.id_table = rtl8169_pci_tbl,
.probe = rtl8169_probe,
};
-
-static int rtl8169_init(void)
-{
- return pci_register_driver(&rtl8169_eth_driver);
-}
-device_initcall(rtl8169_init);
+device_pci_driver(rtl8169_eth_driver);
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
index a140b1dd0..7a9315a0b 100644
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -37,9 +37,4 @@ static struct pci_driver xhci_pci_driver = {
.id_table = xhci_pci_tbl,
.probe = xhci_pci_probe,
};
-
-static int xhci_pci_init(void)
-{
- return pci_register_driver(&xhci_pci_driver);
-}
-device_initcall(xhci_pci_init);
+device_pci_driver(xhci_pci_driver);
--
2.20.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2019-02-12 6:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-12 6:40 [PATCH 0/8] NVME support Andrey Smirnov
2019-02-12 6:40 ` [PATCH 1/8] PCI: Fix to_pci_dev() macro Andrey Smirnov
2019-02-12 6:40 ` [PATCH 2/8] PCI: Introduce device_pci_driver() Andrey Smirnov
2019-02-12 6:40 ` Andrey Smirnov [this message]
2019-02-12 6:40 ` [PATCH 4/8] include: Sync up pci_ids.h with 4.20-rc1 Andrey Smirnov
2019-02-12 6:40 ` [PATCH 5/8] include: Add definitnion for HZ Andrey Smirnov
2019-02-12 6:40 ` [PATCH 6/8] include: Import uuid.h for Linux Andrey Smirnov
2019-02-12 6:40 ` [PATCH 7/8] include: Import min_not_zero() macro from Linux Andrey Smirnov
2019-02-12 6:40 ` [PATCH 8/8] drivers: Import a very basic NVME implementation " Andrey Smirnov
2019-02-18 8:24 ` [PATCH 0/8] NVME support Sascha Hauer
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=20190212064022.26154-4-andrew.smirnov@gmail.com \
--to=andrew.smirnov@gmail.com \
--cc=barebox@lists.infradead.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