lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 16 Jun 2014 10:14:23 +0100
From:	Lee Jones <lee.jones@...aro.org>
To:	Kefeng Wang <wangkefeng.wang@...wei.com>
Cc:	Samuel Ortiz <sameo@...ux.intel.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mfd: syscon: Use module_platform_driver()

On Mon, 09 Jun 2014, Kefeng Wang wrote:

> Convert to module_platform_drive() to eliminate boilerplate code.
> 
> Signed-off-by: Kefeng Wang <wangkefeng.wang@...wei.com>
> ---
>  drivers/mfd/syscon.c |   12 +-----------
>  1 files changed, 1 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/mfd/syscon.c b/drivers/mfd/syscon.c
> index ca15878..6c2c874 100644
> --- a/drivers/mfd/syscon.c
> +++ b/drivers/mfd/syscon.c
> @@ -173,17 +173,7 @@ static struct platform_driver syscon_driver = {
>  	.id_table	= syscon_ids,
>  };
>  
> -static int __init syscon_init(void)
> -{
> -	return platform_driver_register(&syscon_driver);
> -}
> -postcore_initcall(syscon_init);
> -
> -static void __exit syscon_exit(void)
> -{
> -	platform_driver_unregister(&syscon_driver);
> -}
> -module_exit(syscon_exit);
> +module_platform_driver(syscon_driver)

You have changed the initialisation semantics of quite an important
driver here.  Initialising with postcore_initcall() is not so boiler
plate and swapping it out for a module_init() as you're doing with
this patch will probably break some systems.

>  MODULE_AUTHOR("Dong Aisheng <dong.aisheng@...aro.org>");
>  MODULE_DESCRIPTION("System Control driver");

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists