Re: [PATCH] Input: touchscreen: mc13783_ts.c: Convert to platform driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Fabio,

On Mon, Jan 07, 2013 at 06:32:57PM -0200, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@xxxxxxxxxxxxx>
> 
> Using module_platform_driver() can make the code smaller and cleaner.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@xxxxxxxxxxxxx>
> ---
>  drivers/input/touchscreen/mc13783_ts.c |   13 ++-----------
>  1 file changed, 2 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/input/touchscreen/mc13783_ts.c b/drivers/input/touchscreen/mc13783_ts.c
> index 02103b6..e881c25 100644
> --- a/drivers/input/touchscreen/mc13783_ts.c
> +++ b/drivers/input/touchscreen/mc13783_ts.c
> @@ -243,6 +243,7 @@ static int mc13783_ts_remove(struct platform_device *pdev)
>  }
>  
>  static struct platform_driver mc13783_ts_driver = {
> +	.probe		= mc13783_ts_probe,
>  	.remove		= mc13783_ts_remove,
>  	.driver		= {
>  		.owner	= THIS_MODULE,
> @@ -250,17 +251,7 @@ static struct platform_driver mc13783_ts_driver = {
>  	},
>  };
>  
> -static int __init mc13783_ts_init(void)
> -{
> -	return platform_driver_probe(&mc13783_ts_driver, &mc13783_ts_probe);
> -}
> -module_init(mc13783_ts_init);
> -
> -static void __exit mc13783_ts_exit(void)
> -{
> -	platform_driver_unregister(&mc13783_ts_driver);
> -}
> -module_exit(mc13783_ts_exit);
> +module_platform_driver(mc13783_ts_driver);

This is not equivalent transformation. Did you intend to change the
behavior? If you this should be mentioned (and reasoned) in the
patch description.

Thanks.

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux