Re: [PATCH] PCI: altera: use builtin_platform_driver

From: Ley Foon Tan
Date: Thu Nov 24 2016 - 21:26:29 EST


On Rab, 2016-11-23 at 14:52 +0000, Geliang Tang wrote:
> Use builtin_platform_driver() helper to simplify the code.
>
> Signed-off-by: Geliang Tang <geliangtang@xxxxxxxxx>
Acked-by: Ley Foon Tan <ley.foon.tan@xxxxxxxxx>

> ---
> Âdrivers/pci/host/pcie-altera.c | 6 +-----
> Â1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/drivers/pci/host/pcie-altera.c b/drivers/pci/host/pcie-
> altera.c
> index b0ac4df..eefcb38 100644
> --- a/drivers/pci/host/pcie-altera.c
> +++ b/drivers/pci/host/pcie-altera.c
> @@ -641,8 +641,4 @@ static struct platform_driver altera_pcie_driver
> = {
> ÂÂÂÂÂÂÂÂ},
> Â};
>
> -static int altera_pcie_init(void)
> -{
> -ÂÂÂÂÂÂÂreturn platform_driver_register(&altera_pcie_driver);
> -}
> -device_initcall(altera_pcie_init);
> +builtin_platform_driver(altera_pcie_driver);
> --
> 2.9.3
>