driverdev-devel.linuxdriverproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] staging: mt7621-pci: use builtin_platform_driver()
@ 2020-03-21 13:36 Sergio Paracuellos
  2020-03-21 13:36 ` [PATCH 2/4] staging: mt7621-pci: add myself as a contributor of the driver Sergio Paracuellos
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Sergio Paracuellos @ 2020-03-21 13:36 UTC (permalink / raw)
  To: gregkh; +Cc: neil, driverdev-devel

Macro builtin_platform_driver can be used for builtin drivers
that don't do anything in driver init. So, use the macro
builtin_platform_driver and remove some boilerplate code.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
---
 drivers/staging/mt7621-pci/pci-mt7621.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/drivers/staging/mt7621-pci/pci-mt7621.c
index 1a76968b70c3..b8065b777ff6 100644
--- a/drivers/staging/mt7621-pci/pci-mt7621.c
+++ b/drivers/staging/mt7621-pci/pci-mt7621.c
@@ -725,9 +725,4 @@ static struct platform_driver mt7621_pci_driver = {
 	},
 };
 
-static int __init mt7621_pci_init(void)
-{
-	return platform_driver_register(&mt7621_pci_driver);
-}
-
-module_init(mt7621_pci_init);
+builtin_platform_driver(mt7621_pci_driver);
-- 
2.25.1

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-03-23 11:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-21 13:36 [PATCH 1/4] staging: mt7621-pci: use builtin_platform_driver() Sergio Paracuellos
2020-03-21 13:36 ` [PATCH 2/4] staging: mt7621-pci: add myself as a contributor of the driver Sergio Paracuellos
2020-03-23 10:32   ` Greg KH
2020-03-23 11:31     ` Sergio Paracuellos
2020-03-21 13:36 ` [PATCH 3/4] staging: mt7621-pci-phy: use builtin_platform_driver() Sergio Paracuellos
2020-03-21 13:36 ` [PATCH 4/4] staging: mt7621-pci-phy: re-do 'xtal_mode' detection Sergio Paracuellos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).