diff mbox

PCI: spear: use builtin_platform_driver

Message ID fad445bc8162cd07a298b25a18614773c86ec227.1479912870.git.geliangtang@gmail.com
State Accepted
Headers show

Commit Message

Geliang Tang Nov. 23, 2016, 2:55 p.m. UTC
Use builtin_platform_driver() helper to simplify the code.

Signed-off-by: Geliang Tang <geliangtang@gmail.com>
---
 drivers/pci/host/pcie-spear13xx.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

Comments

Bjorn Helgaas Dec. 7, 2016, 8:36 p.m. UTC | #1
On Wed, Nov 23, 2016 at 10:55:07PM +0800, Geliang Tang wrote:
> Use builtin_platform_driver() helper to simplify the code.
> 
> Signed-off-by: Geliang Tang <geliangtang@gmail.com>

Applied to pci/host-spear for v4.10, thanks!

> ---
>  drivers/pci/host/pcie-spear13xx.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/drivers/pci/host/pcie-spear13xx.c b/drivers/pci/host/pcie-spear13xx.c
> index 3cf197b..dafe8b8 100644
> --- a/drivers/pci/host/pcie-spear13xx.c
> +++ b/drivers/pci/host/pcie-spear13xx.c
> @@ -296,8 +296,4 @@ static struct platform_driver spear13xx_pcie_driver = {
>  	},
>  };
>  
> -static int __init spear13xx_pcie_init(void)
> -{
> -	return platform_driver_register(&spear13xx_pcie_driver);
> -}
> -device_initcall(spear13xx_pcie_init);
> +builtin_platform_driver(spear13xx_pcie_driver);
> -- 
> 2.9.3
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/pci/host/pcie-spear13xx.c b/drivers/pci/host/pcie-spear13xx.c
index 3cf197b..dafe8b8 100644
--- a/drivers/pci/host/pcie-spear13xx.c
+++ b/drivers/pci/host/pcie-spear13xx.c
@@ -296,8 +296,4 @@  static struct platform_driver spear13xx_pcie_driver = {
 	},
 };
 
-static int __init spear13xx_pcie_init(void)
-{
-	return platform_driver_register(&spear13xx_pcie_driver);
-}
-device_initcall(spear13xx_pcie_init);
+builtin_platform_driver(spear13xx_pcie_driver);