mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2024-06-28 11:55:14 +02:00
d21d6ea454
Backport mt7621-pci/mt7621-pci-phy fixes from staging-test Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
33 lines
1.2 KiB
Diff
33 lines
1.2 KiB
Diff
From ffe3dee4081055b4f58bc50dd3f5c97de42cf126 Mon Sep 17 00:00:00 2001
|
|
From: Sergio Paracuellos <sergio.paracuellos@gmail.com>
|
|
Date: Sat, 21 Mar 2020 14:36:23 +0100
|
|
Subject: [PATCH] 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>
|
|
---
|
|
drivers/staging/mt7621-pci-phy/pci-mt7621-phy.c | 7 +------
|
|
1 file changed, 1 insertion(+), 6 deletions(-)
|
|
|
|
--- 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
|
|
},
|
|
};
|
|
|
|
-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");
|