[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20161125.162357.1584801226397085201.davem@davemloft.net>
Date: Fri, 25 Nov 2016 16:23:57 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: geliangtang@...il.com
Cc: mugunthanvnm@...com, grygorii.strashko@...com,
linux-omap@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drivers: net: davinci_mdio: use builtin_platform_driver
From: Geliang Tang <geliangtang@...il.com>
Date: Wed, 23 Nov 2016 22:45:43 +0800
> @@ -536,11 +536,7 @@ static struct platform_driver davinci_mdio_driver = {
> .remove = davinci_mdio_remove,
> };
>
> -static int __init davinci_mdio_init(void)
> -{
> - return platform_driver_register(&davinci_mdio_driver);
> -}
> -device_initcall(davinci_mdio_init);
> +builtin_platform_driver(davinci_mdio_driver);
>
As noted by others this is not a correct transformation, the existing
code works properly when modular. But it will not with this change.
device_initcall() is rerouted to module_init() inside of a module
build, whereas the thing builtin_platform_driver() expands to does
not.
Powered by blists - more mailing lists