From patchwork Mon Sep 17 13:58:10 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Datta, Shubhrajyoti" X-Patchwork-Id: 184408 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-pz0-f56.google.com (mail-pz0-f56.google.com [209.85.210.56]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 563062C0087 for ; Mon, 17 Sep 2012 23:58:28 +1000 (EST) Received: by dano9 with SMTP id o9sf5335188dan.11 for ; Mon, 17 Sep 2012 06:58:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=x-beenthere:received-spf:from:to:cc:subject:date:message-id :x-mailer:in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-google-group-id:list-post:list-help:list-archive:sender :list-subscribe:list-unsubscribe:content-type; bh=qPHznPetIsYkYPS5SnkcD7d20JQQtTw+CtUQoWuikEs=; b=rnp3tfcj1cc2HEAFtVk2E4YJXc6n2fJQsuY6108RuRT6+cEr9lu3n0DDskakccUEHM weUilaG0ZGTBztZffzuwJKRDioEBnGWSmLdQo0We/pZCo18nzeXikD6QuU1N8Sf/s4KU VPFsJZUbzDdAvpUX8x5zss6UrDETb73DKMnRDhl/f6GhGE6lz3bcm+tMWW704Qe2iRkx nwNuuRzZ4I/5LQqZo3opdUnGzmO6O3rUqzJe7BJnBYPhTXxc5eSkmT2rBxQ6/kQCvyZ7 2VAat79Ta5h1IFMieGUzWtRgcVuaGtC0T4woSEpqbItl43c3DoQOcN7ZFOuB/FQvkhaV DXuw== Received: by 10.50.0.170 with SMTP id 10mr3374364igf.3.1347890304889; Mon, 17 Sep 2012 06:58:24 -0700 (PDT) X-BeenThere: rtc-linux@googlegroups.com Received: by 10.231.55.155 with SMTP id u27ls14369616ibg.8.gmail; Mon, 17 Sep 2012 06:58:24 -0700 (PDT) Received: by 10.42.19.199 with SMTP id d7mr4554343icb.11.1347890304456; Mon, 17 Sep 2012 06:58:24 -0700 (PDT) Received: by 10.42.19.199 with SMTP id d7mr4554342icb.11.1347890304445; Mon, 17 Sep 2012 06:58:24 -0700 (PDT) Received: from bear.ext.ti.com (bear.ext.ti.com. [192.94.94.41]) by gmr-mx.google.com with ESMTPS id ba5si1934342igb.3.2012.09.17.06.58.24 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 17 Sep 2012 06:58:24 -0700 (PDT) Received-SPF: pass (google.com: domain of shubhrajyoti@ti.com designates 192.94.94.41 as permitted sender) client-ip=192.94.94.41; Received: from dbdp20.itg.ti.com ([172.24.170.38]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id q8HDwMvJ005550; Mon, 17 Sep 2012 08:58:23 -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 q8HDwJtV026482; Mon, 17 Sep 2012 19:28:21 +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:28:19 +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 q8HDwGai005802; Mon, 17 Sep 2012 19:28:19 +0530 From: Shubhrajyoti D To: CC: , , Shubhrajyoti D Subject: [rtc-linux] [PATCH 3/7] rtc: Convert struct i2c_msg initialization to C99 format Date: Mon, 17 Sep 2012 19:28:10 +0530 Message-ID: <1347890294-28467-4-git-send-email-shubhrajyoti@ti.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1347890294-28467-1-git-send-email-shubhrajyoti@ti.com> References: <1347890294-28467-1-git-send-email-shubhrajyoti@ti.com> MIME-Version: 1.0 X-Original-Sender: shubhrajyoti@ti.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of shubhrajyoti@ti.com designates 192.94.94.41 as permitted sender) smtp.mail=shubhrajyoti@ti.com Reply-To: rtc-linux@googlegroups.com Precedence: list Mailing-list: list rtc-linux@googlegroups.com; contact rtc-linux+owners@googlegroups.com List-ID: X-Google-Group-Id: 712029733259 List-Post: , List-Help: , List-Archive: Sender: rtc-linux@googlegroups.com List-Subscribe: , List-Unsubscribe: , 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/rtc/rtc-isl1208.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-isl1208.c b/drivers/rtc/rtc-isl1208.c index dd2aeee..c3a76ae 100644 --- a/drivers/rtc/rtc-isl1208.c +++ b/drivers/rtc/rtc-isl1208.c @@ -68,9 +68,9 @@ isl1208_i2c_read_regs(struct i2c_client *client, u8 reg, u8 buf[], { u8 reg_addr[1] = { reg }; struct i2c_msg msgs[2] = { - {client->addr, 0, sizeof(reg_addr), reg_addr} + {.addr = client->addr, .flags = 0, .len = sizeof(reg_addr), .buf = reg_addr} , - {client->addr, I2C_M_RD, len, buf} + {.addr = client->addr, .flags = I2C_M_RD, .len = len, .buf = buf} }; int ret; @@ -90,7 +90,7 @@ isl1208_i2c_set_regs(struct i2c_client *client, u8 reg, u8 const buf[], { u8 i2c_buf[ISL1208_REG_USR2 + 2]; struct i2c_msg msgs[1] = { - {client->addr, 0, len + 1, i2c_buf} + {.addr = client->addr, .flags = 0, .len = len + 1, .buf = i2c_buf} }; int ret;