From: Kwangwoo Lee <kwangwoo.lee@gmail.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Thierry Reding <thierry.reding@avionic-design.de>,
Manuel Lauss <mano@roarinelk.homelinux.net>,
Trilok Soni <soni.trilok@gmail.com>,
"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>
Subject: [PATCH] Input: tsc2007: Remove a useless code and check a necessary function is provided or not
Date: Fri, 15 May 2009 14:47:12 +0900 [thread overview]
Message-ID: <483a38b80905142247l31dc77f6sd3deb511fc171f5e@mail.gmail.com> (raw)
Hi Dmitry,
This patch contains a trivial removal and check the existence of a
platform specific function.
Regards,
Kwangwoo Lee
>From bc18ba8c71027ca58d1242149eee9919bdaa069b Mon Sep 17 00:00:00 2001
From: Kwangwoo Lee <kwangwoo.lee@gmail.com>
Date: Fri, 15 May 2009 13:43:55 +0900
Subject: [PATCH] Input: tsc2007: remove useless code and check a
necessary function is provided or not.
Remove a useless code and check a necessary function is implemented or not.
The platform codes must provide get_pendown_state() to work properly.
Signed-off-by: Kwangwoo Lee <kwangwoo.lee@gmail.com>
---
drivers/input/touchscreen/tsc2007.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/input/touchscreen/tsc2007.c
b/drivers/input/touchscreen/tsc2007.c
index 948e167..da35adb 100644
--- a/drivers/input/touchscreen/tsc2007.c
+++ b/drivers/input/touchscreen/tsc2007.c
@@ -253,11 +253,11 @@ static int tsc2007_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
struct tsc2007 *ts;
- struct tsc2007_platform_data *pdata = pdata = client->dev.platform_data;
+ struct tsc2007_platform_data *pdata = client->dev.platform_data;
struct input_dev *input_dev;
int err;
- if (!pdata) {
+ if (!pdata || !pdata->get_pendown_state) {
dev_err(&client->dev, "platform data is required!\n");
return -EINVAL;
}
--
1.5.6.5
next reply other threads:[~2009-05-15 5:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-15 5:47 Kwangwoo Lee [this message]
2009-05-15 7:26 ` [PATCH] Input: tsc2007: Remove a useless code and check a necessary function is provided or not Manuel Lauss
2009-05-15 7:50 ` Kwangwoo Lee
2009-05-16 2:28 ` 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=483a38b80905142247l31dc77f6sd3deb511fc171f5e@mail.gmail.com \
--to=kwangwoo.lee@gmail.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=mano@roarinelk.homelinux.net \
--cc=soni.trilok@gmail.com \
--cc=thierry.reding@avionic-design.de \
/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).