From patchwork Mon Mar 24 15:11:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Lothar_Wa=C3=9Fmann?= X-Patchwork-Id: 3882921 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7C4E19F334 for ; Mon, 24 Mar 2014 15:11:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6F55B2022F for ; Mon, 24 Mar 2014 15:11:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 905432020F for ; Mon, 24 Mar 2014 15:11:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753228AbaCXPLo (ORCPT ); Mon, 24 Mar 2014 11:11:44 -0400 Received: from mail.karo-electronics.de ([81.173.242.67]:53337 "EHLO mail.karo-electronics.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750984AbaCXPLn (ORCPT ); Mon, 24 Mar 2014 11:11:43 -0400 From: =?UTF-8?q?Lothar=20Wa=C3=9Fmann?= To: Dmitry Torokhov , Fugang Duan , Grant Likely , Henrik Rydberg , Ian Campbell , Jingoo Han , Kumar Gala , Mark Rutland , Pawel Moll , Rob Herring , Rob Landley , Sachin Kamat , devicetree@vger.kernel.org, linux-doc@vger.kernel.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Simon Budig , =?UTF-8?q?Lothar=20Wa=C3=9Fmann?= , Daniel Wagener Subject: [PATCHv6 1/5] Input: edt-ft5x06: several cleanups; no functional change Date: Mon, 24 Mar 2014 16:11:06 +0100 Message-Id: <1395673870-29435-2-git-send-email-LW@KARO-electronics.de> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1395673870-29435-1-git-send-email-LW@KARO-electronics.de> References: <1395323075-12146-1-git-send-email-LW@KARO-electronics.de> <1395673870-29435-1-git-send-email-LW@KARO-electronics.de> 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=-7.4 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 - remove redundant parens - remove redundant type casts - fix mixed tab/space indentation Signed-off-by: Lothar Waßmann --- drivers/input/touchscreen/edt-ft5x06.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c index 412a85e..155ab3b 100644 --- a/drivers/input/touchscreen/edt-ft5x06.c +++ b/drivers/input/touchscreen/edt-ft5x06.c @@ -173,7 +173,7 @@ static irqreturn_t edt_ft5x06_ts_isr(int irq, void *dev_id) x = ((buf[0] << 8) | buf[1]) & 0x0fff; y = ((buf[2] << 8) | buf[3]) & 0x0fff; id = (buf[2] >> 4) & 0x0f; - down = (type != TOUCH_EVENT_UP); + down = type != TOUCH_EVENT_UP; input_mt_slot(tsdata->input, id); input_mt_report_slot_state(tsdata->input, MT_TOOL_FINGER, down); @@ -257,7 +257,7 @@ static ssize_t edt_ft5x06_setting_show(struct device *dev, struct edt_ft5x06_ts_data *tsdata = i2c_get_clientdata(client); struct edt_ft5x06_attribute *attr = container_of(dattr, struct edt_ft5x06_attribute, dattr); - u8 *field = (u8 *)((char *)tsdata + attr->field_offset); + u8 *field = (u8 *)tsdata + attr->field_offset; int val; size_t count = 0; int error = 0; @@ -299,7 +299,7 @@ static ssize_t edt_ft5x06_setting_store(struct device *dev, struct edt_ft5x06_ts_data *tsdata = i2c_get_clientdata(client); struct edt_ft5x06_attribute *attr = container_of(dattr, struct edt_ft5x06_attribute, dattr); - u8 *field = (u8 *)((char *)tsdata + attr->field_offset); + u8 *field = (u8 *)tsdata + attr->field_offset; unsigned int val; int error; @@ -479,7 +479,7 @@ static int edt_ft5x06_debugfs_mode_set(void *data, u64 mode) if (mode != tsdata->factory_mode) { retval = mode ? edt_ft5x06_factory_mode(tsdata) : - edt_ft5x06_work_mode(tsdata); + edt_ft5x06_work_mode(tsdata); } mutex_unlock(&tsdata->mutex); @@ -568,7 +568,6 @@ out: return error ?: read; }; - static const struct file_operations debugfs_raw_data_fops = { .open = simple_open, .read = edt_ft5x06_debugfs_raw_data_read, @@ -614,8 +613,6 @@ edt_ft5x06_ts_teardown_debugfs(struct edt_ft5x06_ts_data *tsdata) #endif /* CONFIG_DEBUGFS */ - - static int edt_ft5x06_ts_reset(struct i2c_client *client, int reset_pin) { @@ -852,8 +849,8 @@ static SIMPLE_DEV_PM_OPS(edt_ft5x06_ts_pm_ops, edt_ft5x06_ts_suspend, edt_ft5x06_ts_resume); static const struct i2c_device_id edt_ft5x06_ts_id[] = { - { "edt-ft5x06", 0 }, - { } + { "edt-ft5x06", 0, }, + { /* sentinel */ } }; MODULE_DEVICE_TABLE(i2c, edt_ft5x06_ts_id);