diff options
author | 2020-03-21 14:36:23 +0100 | |
---|---|---|
committer | 2020-03-23 11:32:42 +0100 | |
commit | 1a4bcfa6028563b358317515c0e514545231fb2a (patch) | |
tree | f50f43f6a58ee00fa7fdba40defd1e3d76ac53ce | |
parent | staging: mt7621-pci: use builtin_platform_driver() (diff) | |
download | wireguard-linux-1a4bcfa6028563b358317515c0e514545231fb2a.tar.xz wireguard-linux-1a4bcfa6028563b358317515c0e514545231fb2a.zip |
staging: mt7621-pci-phy: 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-3-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to '')
-rw-r--r-- | drivers/staging/mt7621-pci-phy/pci-mt7621-phy.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/staging/mt7621-pci-phy/pci-mt7621-phy.c b/drivers/staging/mt7621-pci-phy/pci-mt7621-phy.c index 63dfbb85af11..8100d8286365 100644 --- a/drivers/staging/mt7621-pci-phy/pci-mt7621-phy.c +++ b/drivers/staging/mt7621-pci-phy/pci-mt7621-phy.c @@ -361,12 +361,7 @@ static struct platform_driver mt7621_pci_phy_driver = { }, }; -static int __init mt7621_pci_phy_drv_init(void) -{ - return platform_driver_register(&mt7621_pci_phy_driver); -} - -module_init(mt7621_pci_phy_drv_init); +builtin_platform_driver(mt7621_pci_phy_driver); MODULE_AUTHOR("Sergio Paracuellos <sergio.paracuellos@gmail.com>"); MODULE_DESCRIPTION("MediaTek MT7621 PCIe PHY driver"); |