Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1530537 > unrolled thread

Re: [PATCH] drivers: net: davinci_mdio: use builtin_platform_driver

Started byDavid Miller <davem@davemloft.net>
First post2016-11-25 22:30 +0100
Last post2016-11-25 22:30 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] drivers: net: davinci_mdio: use builtin_platform_driver David Miller <davem@davemloft.net> - 2016-11-25 22:30 +0100

#1530537 — Re: [PATCH] drivers: net: davinci_mdio: use builtin_platform_driver

FromDavid Miller <davem@davemloft.net>
Date2016-11-25 22:30 +0100
SubjectRe: [PATCH] drivers: net: davinci_mdio: use builtin_platform_driver
Message-ID<sHwed-5RF-1@gated-at.bofh.it>
From: Geliang Tang <geliangtang@gmail.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.

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web