[PATCH 16/19] ARM: nomadik: register nmk_gpio_driver using platform_driver_probe

Rabin VINCENT rabin.vincent at stericsson.com
Mon Aug 9 02:59:34 EDT 2010


On Thu, Aug 05, 2010 at 16:08:50 +0200, Uwe Kleine-König wrote:
> diff --git a/arch/arm/plat-nomadik/gpio.c b/arch/arm/plat-nomadik/gpio.c
> index 977c8f9..9bc1646 100644
> --- a/arch/arm/plat-nomadik/gpio.c
> +++ b/arch/arm/plat-nomadik/gpio.c
> @@ -624,14 +624,13 @@ static struct platform_driver nmk_gpio_driver = {
>  		.owner = THIS_MODULE,
>  		.name = "gpio",
>  		},
> -	.probe = nmk_gpio_probe,
>  	.suspend = NULL, /* to be done */
>  	.resume = NULL,
>  };
>  
>  static int __init nmk_gpio_init(void)
>  {
> -	return platform_driver_register(&nmk_gpio_driver);
> +	return platform_driver_probe(&nmk_gpio_driver, nmk_gpio_probe);
>  }
>  
>  core_initcall(nmk_gpio_init);

This won't quite work, because this is a core_initcall (intentionally),
and the platform devices are not yet registered when nmk_gpio_init() is
called.  nmk_gpio_probe() could be moved to __devinit to fix the modpost
warning.

Rabin



More information about the linux-arm-kernel mailing list