[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK9yfHyw+rfgpBW+JiGE4bgv3s5t3nmGxoeqzE-ystq_b+mf8A@mail.gmail.com>
Date: Wed, 27 Mar 2013 14:29:26 +0530
From: Sachin Kamat <sachin.kamat@...aro.org>
To: device-drivers-devel@...ckfin.uclinux.org,
LKML <linux-kernel@...r.kernel.org>
Cc: michael.hennerich@...log.com, sameo@...ux.intel.com,
sachin.kamat@...aro.org
Subject: Re: [PATCH 1/1] mfd: adp5520: Use module_i2c_driver()
On 15 March 2013 17:10, Sachin Kamat <sachin.kamat@...aro.org> wrote:
> module_i2c_driver() removes some boilerplate and makes the code
> simple.
>
> Signed-off-by: Sachin Kamat <sachin.kamat@...aro.org>
> ---
> drivers/mfd/adp5520.c | 12 +-----------
> 1 files changed, 1 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/mfd/adp5520.c b/drivers/mfd/adp5520.c
> index 210dd03..5ab021f 100644
> --- a/drivers/mfd/adp5520.c
> +++ b/drivers/mfd/adp5520.c
> @@ -360,17 +360,7 @@ static struct i2c_driver adp5520_driver = {
> .id_table = adp5520_id,
> };
>
> -static int __init adp5520_init(void)
> -{
> - return i2c_add_driver(&adp5520_driver);
> -}
> -module_init(adp5520_init);
> -
> -static void __exit adp5520_exit(void)
> -{
> - i2c_del_driver(&adp5520_driver);
> -}
> -module_exit(adp5520_exit);
> +module_i2c_driver(adp5520_driver);
>
> MODULE_AUTHOR("Michael Hennerich <hennerich@...ckfin.uclinux.org>");
> MODULE_DESCRIPTION("ADP5520(01) PMIC-MFD Driver");
> --
> 1.7.4.1
>
ping...
--
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