From: Linus Walleij <linus.walleij@linaro.org>
To: JJ Ding <jj_ding@emc.com.tw>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Greg Kroah-Hartman <gregkh@suse.de>,
Grant Likely <grant.likely@secretlab.ca>,
linux-kernel@vger.kernel.org, linux-input@vger.kernel.org,
JJ Ding <dgdunix@gmail.com>
Subject: Re: [PATCH TRIVIAL 1/5] Input: keyboard: use macro module_platform_driver()
Date: Tue, 22 Nov 2011 10:23:06 +0100 [thread overview]
Message-ID: <CACRpkdadvJN2P-imOmNFMiYHTh6Vkoadbd4SEyWNQi76kAoVUw@mail.gmail.com> (raw)
In-Reply-To: <1321952446-7591-2-git-send-email-jj_ding@emc.com.tw>
On Tue, Nov 22, 2011 at 10:00 AM, JJ Ding <jj_ding@emc.com.tw> wrote:
> Commit 940ab88962bc1aff3273a8356d64577a6e386736 introduced a new macro to
> save some platform_driver boilerplate code. Use it.
>
> Signed-off-by: JJ Ding <dgdunix@gmail.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@stericsson.com> / Sundar Iyer <sundar.iyer@stericsson.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@linaro.org>
Yours,
Linus Walleij
next prev parent reply other threads:[~2011-11-22 9:23 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-22 9:00 [PATCH TRIVIAL 0/5] Input: use new macro module_platform_driver to save some boilerplate code JJ Ding
2011-11-22 9:00 ` [PATCH TRIVIAL 1/5] Input: keyboard: use macro module_platform_driver() JJ Ding
2011-11-22 9:23 ` Linus Walleij [this message]
2011-11-22 15:00 ` Mike Frysinger
2011-11-22 20:15 ` H Hartley Sweeten
2012-01-10 20:47 ` Geert Uytterhoeven
2012-01-10 20:57 ` Geert Uytterhoeven
2012-01-10 22:22 ` Dmitry Torokhov
2012-01-10 23:07 ` Dmitry Torokhov
2012-01-11 2:07 ` JJ Ding
2011-11-22 9:00 ` [PATCH TRIVIAL 2/5] Input: misc: " JJ Ding
2011-11-22 14:59 ` Mike Frysinger
2011-11-22 9:00 ` [PATCH TRIVIAL 3/5] Input: mouse: " JJ Ding
2011-11-22 9:00 ` [PATCH TRIVIAL 4/5] Input: serio: " JJ Ding
2011-11-22 9:00 ` [PATCH TRIVIAL 5/5] Input: touchscreen: " JJ Ding
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=CACRpkdadvJN2P-imOmNFMiYHTh6Vkoadbd4SEyWNQi76kAoVUw@mail.gmail.com \
--to=linus.walleij@linaro.org \
--cc=dgdunix@gmail.com \
--cc=dmitry.torokhov@gmail.com \
--cc=grant.likely@secretlab.ca \
--cc=gregkh@suse.de \
--cc=jj_ding@emc.com.tw \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).