public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Evgeniy Polyakov <zbr@ioremap.net>
To: Wei Yongjun <weiyj.lk@gmail.com>
Cc: yongjun_wei@trendmicro.com.cn, linux-kernel@vger.kernel.org,
	Ben Gardner <bgardner@wabtec.com>, GregKH <greg@kroah.com>
Subject: Re: [PATCH] w1/ds2482: use module_i2c_driver to simplify the code
Date: Tue, 9 Oct 2012 19:51:18 +0400	[thread overview]
Message-ID: <20121009155118.GA29625@ioremap.net> (raw)
In-Reply-To: <CAPgLHd9u7-N=MVtP7d6QYTfeVL6CL3pc94Lrucp_NVDLo6yxPA@mail.gmail.com>

On Mon, Oct 08, 2012 at 10:06:07PM +0800, Wei Yongjun (weiyj.lk@gmail.com) wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.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@trendmicro.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@ioremap.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@wabtec.com>");
>  MODULE_DESCRIPTION("DS2482 driver");
>  MODULE_LICENSE("GPL");
> -
> -module_init(sensors_ds2482_init);
> -module_exit(sensors_ds2482_exit);
> 

-- 
	Evgeniy Polyakov

      reply	other threads:[~2012-10-09 15:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-08 14:06 [PATCH] w1/ds2482: use module_i2c_driver to simplify the code Wei Yongjun
2012-10-09 15:51 ` Evgeniy Polyakov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121009155118.GA29625@ioremap.net \
    --to=zbr@ioremap.net \
    --cc=bgardner@wabtec.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=weiyj.lk@gmail.com \
    --cc=yongjun_wei@trendmicro.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox