[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdadvJN2P-imOmNFMiYHTh6Vkoadbd4SEyWNQi76kAoVUw@mail.gmail.com>
Date: Tue, 22 Nov 2011 10:23:06 +0100
From: Linus Walleij <linus.walleij@...aro.org>
To: JJ Ding <jj_ding@....com.tw>
Cc: Dmitry Torokhov <dmitry.torokhov@...il.com>,
Greg Kroah-Hartman <gregkh@...e.de>,
Grant Likely <grant.likely@...retlab.ca>,
linux-kernel@...r.kernel.org, linux-input@...r.kernel.org,
JJ Ding <dgdunix@...il.com>
Subject: Re: [PATCH TRIVIAL 1/5] Input: keyboard: use macro module_platform_driver()
On Tue, Nov 22, 2011 at 10:00 AM, JJ Ding <jj_ding@....com.tw> wrote:
> Commit 940ab88962bc1aff3273a8356d64577a6e386736 introduced a new macro to
> save some platform_driver boilerplate code. Use it.
>
> Signed-off-by: JJ Ding <dgdunix@...il.com>
(...)
> diff --git a/drivers/input/keyboard/nomadik-ske-keypad.c b/drivers/input/keyboard/nomadik-ske-keypad.c
> index fcdec5e..6c4828f 100644
> --- a/drivers/input/keyboard/nomadik-ske-keypad.c
> +++ b/drivers/input/keyboard/nomadik-ske-keypad.c
> @@ -390,18 +390,7 @@ struct platform_driver ske_keypad_driver = {
> .probe = ske_keypad_probe,
> .remove = __devexit_p(ske_keypad_remove),
> };
> -
> -static int __init ske_keypad_init(void)
> -{
> - return platform_driver_probe(&ske_keypad_driver, ske_keypad_probe);
> -}
> -module_init(ske_keypad_init);
> -
> -static void __exit ske_keypad_exit(void)
> -{
> - platform_driver_unregister(&ske_keypad_driver);
> -}
> -module_exit(ske_keypad_exit);
> +module_platform_driver(ske_keypad_driver);
>
> MODULE_LICENSE("GPL v2");
> MODULE_AUTHOR("Naveen Kumar <naveen.gaddipati@...ricsson.com> / Sundar Iyer <sundar.iyer@...ricsson.com>");
This actually also fixes a bug since platform_driver_probe() was used even
though there is a .probe member in the driver struct, so thanks.
Acked-by: Linus Walleij <linus.walleij@...aro.org>
Yours,
Linus Walleij
--
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