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  linux-cve-announce  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]
Message-ID: <20121009155118.GA29625@ioremap.net>
Date:	Tue, 9 Oct 2012 19:51:18 +0400
From:	Evgeniy Polyakov <zbr@...emap.net>
To:	Wei Yongjun <weiyj.lk@...il.com>
Cc:	yongjun_wei@...ndmicro.com.cn, linux-kernel@...r.kernel.org,
	Ben Gardner <bgardner@...tec.com>, GregKH <greg@...ah.com>
Subject: Re: [PATCH] w1/ds2482: use module_i2c_driver to simplify the code

On Mon, Oct 08, 2012 at 10:06:07PM +0800, Wei Yongjun (weiyj.lk@...il.com) wrote:
> From: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>
> 
> Use the module_i2c_driver() macro to make the code smaller
> and a bit simpler.
> 
> dpatch engine is used to auto generate this patch.
> (https://github.com/weiyj/dpatch)
> 
> Signed-off-by: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>

Looks good for me, but I added Ben Gardner (original author) to hear
from him if it is ok.

Greg, please pull it into your tree, when things are settled.

Acked-by: Evgeniy Polyakov <zbr@...emap.net>

> ---
>  drivers/w1/masters/ds2482.c | 13 +------------
>  1 file changed, 1 insertion(+), 12 deletions(-)
> 
> diff --git a/drivers/w1/masters/ds2482.c b/drivers/w1/masters/ds2482.c
> index e5f7441..6429b9e 100644
> --- a/drivers/w1/masters/ds2482.c
> +++ b/drivers/w1/masters/ds2482.c
> @@ -505,19 +505,8 @@ static int ds2482_remove(struct i2c_client *client)
>  	return 0;
>  }
>  
> -static int __init sensors_ds2482_init(void)
> -{
> -	return i2c_add_driver(&ds2482_driver);
> -}
> -
> -static void __exit sensors_ds2482_exit(void)
> -{
> -	i2c_del_driver(&ds2482_driver);
> -}
> +module_i2c_driver(ds2482_driver);
>  
>  MODULE_AUTHOR("Ben Gardner <bgardner@...tec.com>");
>  MODULE_DESCRIPTION("DS2482 driver");
>  MODULE_LICENSE("GPL");
> -
> -module_init(sensors_ds2482_init);
> -module_exit(sensors_ds2482_exit);
> 

-- 
	Evgeniy Polyakov
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ