lkml.org 
[lkml]   [2014]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] mfd: menelaus: Use module_i2c_driver
> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2014-05-29 14:41    [W:0.034 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site