You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
1.0 KiB
Diff
30 lines
1.0 KiB
Diff
4 years ago
|
From 60a15339ceab9fc2a6cdc85fd54b66b2c947ab4e Mon Sep 17 00:00:00 2001
|
||
|
From: Sergio Paracuellos <sergio.paracuellos@gmail.com>
|
||
|
Date: Sat, 21 Mar 2020 14:36:21 +0100
|
||
|
Subject: [PATCH] staging: mt7621-pci: use builtin_platform_driver()
|
||
|
|
||
|
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>
|
||
|
Link: https://lore.kernel.org/r/20200321133624.31388-1-sergio.paracuellos@gmail.com
|
||
|
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||
|
---
|
||
|
drivers/staging/mt7621-pci/pci-mt7621.c | 7 +------
|
||
|
1 file changed, 1 insertion(+), 6 deletions(-)
|
||
|
|
||
|
--- 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
|
||
|
},
|
||
|
};
|
||
|
|
||
|
-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);
|