From patchwork Thu Jan 9 21:21:39 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Heiko_St=C3=BCbner?= X-Patchwork-Id: 3463181 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 22655C02DC for ; Thu, 9 Jan 2014 21:22:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4789B200F0 for ; Thu, 9 Jan 2014 21:21:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6D7C0200D5 for ; Thu, 9 Jan 2014 21:21:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756638AbaAIVV5 (ORCPT ); Thu, 9 Jan 2014 16:21:57 -0500 Received: from gloria.sntech.de ([95.129.55.99]:34278 "EHLO gloria.sntech.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756546AbaAIVV5 (ORCPT ); Thu, 9 Jan 2014 16:21:57 -0500 Received: from ip545477c2.speed.planet.nl ([84.84.119.194] helo=phil.localnet) by gloria.sntech.de with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1W1N36-0000kU-2c; Thu, 09 Jan 2014 22:21:56 +0100 From: Heiko =?ISO-8859-1?Q?St=FCbner?= To: Dmitry Torokhov Cc: Henrik Rydberg , 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 Message-ID: <9329039.m1JhHsx7ix@phil> User-Agent: KMail/4.11.3 (Linux/3.11-2-amd64; KDE/4.11.3; x86_64; ; ) In-Reply-To: <2587208.XYbbI8xJiH@phil> References: <2587208.XYbbI8xJiH@phil> MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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;