public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Sachin Kamat <sachin.kamat@linaro.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] mfd: menelaus: Use module_i2c_driver
Date: Thu, 29 May 2014 13:02:02 +0100	[thread overview]
Message-ID: <20140529120202.GL1954@lee--X1> (raw)
In-Reply-To: <1401363802-18961-1-git-send-email-sachin.kamat@linaro.org>

> module_i2c_driver simplifies the code by eliminating
> boilerplate code.
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> ---
>  drivers/mfd/menelaus.c |   23 +----------------------
>  1 file changed, 1 insertion(+), 22 deletions(-)

Applied, thanks.

> diff --git a/drivers/mfd/menelaus.c b/drivers/mfd/menelaus.c
> index ad25bfa3fb02..5e2667afe2bc 100644
> --- a/drivers/mfd/menelaus.c
> +++ b/drivers/mfd/menelaus.c
> @@ -1287,29 +1287,8 @@ static struct i2c_driver menelaus_i2c_driver = {
>  	.id_table	= menelaus_id,
>  };
>  
> -static int __init menelaus_init(void)
> -{
> -	int res;
> -
> -	res = i2c_add_driver(&menelaus_i2c_driver);
> -	if (res < 0) {
> -		pr_err(DRIVER_NAME ": driver registration failed\n");
> -		return res;
> -	}
> -
> -	return 0;
> -}
> -
> -static void __exit menelaus_exit(void)
> -{
> -	i2c_del_driver(&menelaus_i2c_driver);
> -
> -	/* FIXME: Shutdown menelaus parts that can be shut down */
> -}
> +module_i2c_driver(menelaus_i2c_driver);
>  
>  MODULE_AUTHOR("Texas Instruments, Inc. (and others)");
>  MODULE_DESCRIPTION("I2C interface for Menelaus.");
>  MODULE_LICENSE("GPL");
> -
> -module_init(menelaus_init);
> -module_exit(menelaus_exit);

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

      reply	other threads:[~2014-05-29 12:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-29 11:43 [PATCH 1/1] mfd: menelaus: Use module_i2c_driver Sachin Kamat
2014-05-29 12:02 ` Lee Jones [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=20140529120202.GL1954@lee--X1 \
    --to=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sachin.kamat@linaro.org \
    /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