From: "Heiko Stübner" <heiko.stuebner@bqreaders.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Henrik Rydberg <rydberg@euromail.se>, linux-input@vger.kernel.org
Subject: [PATCH 2/3] Input: zforce: Use internal pdata pointer instead of dev_get_platdata
Date: Thu, 09 Jan 2014 22:21:39 +0100 [thread overview]
Message-ID: <9329039.m1JhHsx7ix@phil> (raw)
In-Reply-To: <2587208.XYbbI8xJiH@phil>
When the device is initialized from devicetree the platformdata is created
locally making dev_get_platdata return NULL.
Therefore directly use the internal pointer to the pdata instead.
Signed-off-by: Heiko Stuebner <heiko.stuebner@bqreaders.com>
---
drivers/input/touchscreen/zforce_ts.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/input/touchscreen/zforce_ts.c b/drivers/input/touchscreen/zforce_ts.c
index 2175f34..5a1a93b 100644
--- a/drivers/input/touchscreen/zforce_ts.c
+++ b/drivers/input/touchscreen/zforce_ts.c
@@ -255,7 +255,7 @@ static int zforce_setconfig(struct zforce_ts *ts, char b1)
static int zforce_start(struct zforce_ts *ts)
{
struct i2c_client *client = ts->client;
- const struct zforce_ts_platdata *pdata = dev_get_platdata(&client->dev);
+ const struct zforce_ts_platdata *pdata = ts->pdata;
int ret;
dev_dbg(&client->dev, "starting device\n");
@@ -326,7 +326,7 @@ static int zforce_stop(struct zforce_ts *ts)
static int zforce_touch_event(struct zforce_ts *ts, u8 *payload)
{
struct i2c_client *client = ts->client;
- const struct zforce_ts_platdata *pdata = dev_get_platdata(&client->dev);
+ const struct zforce_ts_platdata *pdata = ts->pdata;
struct zforce_point point;
int count, i, num = 0;
@@ -471,7 +471,7 @@ static irqreturn_t zforce_irq_thread(int irq, void *dev_id)
{
struct zforce_ts *ts = dev_id;
struct i2c_client *client = ts->client;
- const struct zforce_ts_platdata *pdata = dev_get_platdata(&client->dev);
+ const struct zforce_ts_platdata *pdata = ts->pdata;
int ret;
u8 payload_buffer[512];
u8 *payload;
--
1.7.10.4
next prev parent reply other threads:[~2014-01-09 21:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-09 21:19 [PATCH 0/3] Input: add dt support to zforce driver Heiko Stübner
2014-01-09 21:21 ` [PATCH 1/3] dt-bindings: bindings for zforce touchscreens Heiko Stübner
2014-01-09 21:21 ` Heiko Stübner [this message]
2014-01-09 21:22 ` [PATCH 3/3] Input: zforce: add devicetree support Heiko Stübner
2014-01-28 6:45 ` [PATCH 0/3] Input: add dt support to zforce driver Dmitry Torokhov
2014-04-22 19:19 ` [PATCH] input: zforce: add regulator handling Heiko Stübner
2014-05-23 7:51 ` Heiko Stübner
2014-07-21 15:20 ` [PATCH RESEND] " Heiko Stübner
2014-07-21 17:42 ` 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=9329039.m1JhHsx7ix@phil \
--to=heiko.stuebner@bqreaders.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=rydberg@euromail.se \
/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).