From: linux@roeck-us.net (Guenter Roeck)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 09/33] Input: sun4i-lradc-keys - Drop unnecessary call to platform_set_drvdata and other changes
Date: Wed, 18 Jan 2017 09:46:30 -0800 [thread overview]
Message-ID: <1484761614-12225-10-git-send-email-linux@roeck-us.net> (raw)
In-Reply-To: <1484761614-12225-1-git-send-email-linux@roeck-us.net>
There is no call to platform_get_drvdata() or dev_get_drvdata().
Drop the unnecessary call to platform_set_drvdata().
Other relevant changes:
Simplify error return
This conversion was done automatically with coccinelle using the
following semantic patches. The semantic patches and the scripts
used to generate this commit log are available at
https://github.com/groeck/coccinelle-patches
- Replace 'if (e) return e; return 0;' with 'return e;'
- Drop platform_set_drvdata()
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
drivers/input/keyboard/sun4i-lradc-keys.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/input/keyboard/sun4i-lradc-keys.c b/drivers/input/keyboard/sun4i-lradc-keys.c
index cc8f7ddcee53..c153d956778c 100644
--- a/drivers/input/keyboard/sun4i-lradc-keys.c
+++ b/drivers/input/keyboard/sun4i-lradc-keys.c
@@ -257,12 +257,7 @@ static int sun4i_lradc_probe(struct platform_device *pdev)
if (error)
return error;
- error = input_register_device(lradc->input);
- if (error)
- return error;
-
- platform_set_drvdata(pdev, lradc);
- return 0;
+ return input_register_device(lradc->input);
}
static const struct of_device_id sun4i_lradc_of_match[] = {
--
2.7.4
next parent reply other threads:[~2017-01-18 17:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1484761614-12225-1-git-send-email-linux@roeck-us.net>
2017-01-18 17:46 ` Guenter Roeck [this message]
2017-02-02 7:45 ` [PATCH 09/33] Input: sun4i-lradc-keys - Drop unnecessary call to platform_set_drvdata and other changes Chen-Yu Tsai
2017-01-18 17:46 ` [PATCH 23/33] Input: xilinx_ps2 - Use 'dev' instead of dereferencing it " Guenter Roeck
2017-01-18 19:17 ` Dmitry Torokhov
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=1484761614-12225-10-git-send-email-linux@roeck-us.net \
--to=linux@roeck-us.net \
--cc=linux-arm-kernel@lists.infradead.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).