From patchwork Mon Sep 17 14:18:01 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shubhrajyoti Datta X-Patchwork-Id: 1467641 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 70AA3DF2D8 for ; Mon, 17 Sep 2012 14:18:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756456Ab2IQOSX (ORCPT ); Mon, 17 Sep 2012 10:18:23 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:35816 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756405Ab2IQOSV (ORCPT ); Mon, 17 Sep 2012 10:18:21 -0400 Received: from dbdp20.itg.ti.com ([172.24.170.38]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id q8HEI7nN009398; Mon, 17 Sep 2012 09:18:08 -0500 Received: from DBDE71.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id q8HEI5aq000617; Mon, 17 Sep 2012 19:48:06 +0530 (IST) Received: from dbdp32.itg.ti.com (172.24.170.251) by DBDE71.ent.ti.com (172.24.170.149) with Microsoft SMTP Server id 14.1.323.3; Mon, 17 Sep 2012 19:48:05 +0530 Received: from ula0393217.india.ti.com (smtpvbd.itg.ti.com [172.24.170.250]) by dbdp32.itg.ti.com (8.13.8/8.13.8) with ESMTP id q8HEI3Rx007153; Mon, 17 Sep 2012 19:48:05 +0530 From: Shubhrajyoti D To: CC: , , Shubhrajyoti D Subject: [PATCH 2/2] input: Convert struct i2c_msg initialization to C99 format Date: Mon, 17 Sep 2012 19:48:01 +0530 Message-ID: <1347891481-18086-3-git-send-email-shubhrajyoti@ti.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1347891481-18086-1-git-send-email-shubhrajyoti@ti.com> References: <1347891481-18086-1-git-send-email-shubhrajyoti@ti.com> MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Convert the struct i2c_msg initialization to C99 format. This makes maintaining and editing the code simpler. Also helps once other fields like transferred are added in future. Signed-off-by: Shubhrajyoti D --- drivers/input/touchscreen/cy8ctmg110_ts.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/input/touchscreen/cy8ctmg110_ts.c b/drivers/input/touchscreen/cy8ctmg110_ts.c index 464f1bf..2ed0427 100644 --- a/drivers/input/touchscreen/cy8ctmg110_ts.c +++ b/drivers/input/touchscreen/cy8ctmg110_ts.c @@ -99,9 +99,9 @@ static int cy8ctmg110_read_regs(struct cy8ctmg110 *tsc, int ret; struct i2c_msg msg[2] = { /* first write slave position to i2c devices */ - { client->addr, 0, 1, &cmd }, + { .addr = client->addr, .flags = 0, .len = 1, .buf = &cmd }, /* Second read data from position */ - { client->addr, I2C_M_RD, len, data } + { .addr = client->addr, .flags = I2C_M_RD, .len = len, .buf = data } }; ret = i2c_transfer(client->adapter, msg, 2);