From patchwork Tue Sep 25 10:33:41 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Datta, Shubhrajyoti" X-Patchwork-Id: 186761 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-qc0-f184.google.com (mail-qc0-f184.google.com [209.85.216.184]) (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 430592C0096 for ; Tue, 25 Sep 2012 20:33:57 +1000 (EST) Received: by qcsv15 with SMTP id v15sf1683454qcs.11 for ; Tue, 25 Sep 2012 03:33:54 -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=WnvoQMnp0S4fWg0YxvR5XlPB5OkBVJo86PhT+T6YvoA=; b=xx7WF73E8i1fYB6U5BYBsfkPAlDWa/pOt9t8w6m5UG9cmWGFniUI2caFhkxRN+cW1V 3hF6D2PteZGo4hi0bQDhSGZLSA4D+haWMHleaZkzrv6FHgs/Yy+Qi3khxWhQjohTzXZs mSkLuuI8ynPbnCqZ351R38gc2P5zHwINEowEv7goxFMNa3D8H4oshkvR1k9GBzF3E54C d+2OUyWoWwpTz6YiRlvL7xvBOjZsZ2wpxqCPbkQmaoNoT9soWU6sXecTrkn8wm7s4kK1 HpBoNEHb0KJ6abwJ9ez/TuN5QXxI+7dYD0BuOE9h1FXQ2qxaFVNRzKlj07ZP4gCjNpIk GFoQ== Received: by 10.50.217.196 with SMTP id pa4mr3921880igc.5.1348569234031; Tue, 25 Sep 2012 03:33:54 -0700 (PDT) X-BeenThere: rtc-linux@googlegroups.com Received: by 10.231.76.105 with SMTP id b41ls5365491ibk.8.gmail; Tue, 25 Sep 2012 03:33:53 -0700 (PDT) Received: by 10.43.51.137 with SMTP id vi9mr5989034icb.16.1348569233697; Tue, 25 Sep 2012 03:33:53 -0700 (PDT) Received: by 10.43.51.137 with SMTP id vi9mr5989033icb.16.1348569233677; Tue, 25 Sep 2012 03:33:53 -0700 (PDT) Received: from arroyo.ext.ti.com (arroyo.ext.ti.com. [192.94.94.40]) by gmr-mx.google.com with ESMTPS id us14si1740358igb.3.2012.09.25.03.33.53 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 25 Sep 2012 03:33:53 -0700 (PDT) Received-SPF: pass (google.com: domain of shubhrajyoti@ti.com designates 192.94.94.40 as permitted sender) client-ip=192.94.94.40; Received: from dbdp20.itg.ti.com ([172.24.170.38]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id q8PAXp1a007592; Tue, 25 Sep 2012 05:33:52 -0500 Received: from DBDE70.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id q8PAXnKd000861; Tue, 25 Sep 2012 16:03:50 +0530 (IST) Received: from dbdp33.itg.ti.com (172.24.170.252) by dbde70.ent.ti.com (172.24.170.148) with Microsoft SMTP Server id 14.1.323.3; Tue, 25 Sep 2012 16:03:49 +0530 Received: from ula0393217.india.ti.com (smtpvbd.itg.ti.com [172.24.170.250]) by dbdp33.itg.ti.com (8.13.8/8.13.8) with ESMTP id q8PAXkDn021365; Tue, 25 Sep 2012 16:03:49 +0530 From: Shubhrajyoti D To: CC: , , , Shubhrajyoti D Subject: [rtc-linux] [PATCHv2 4/7] rtc: Convert struct i2c_msg initialization to C99 format Date: Tue, 25 Sep 2012 16:03:41 +0530 Message-ID: <1348569224-4096-5-git-send-email-shubhrajyoti@ti.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1348569224-4096-1-git-send-email-shubhrajyoti@ti.com> References: <1348569224-4096-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.40 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. while at it also fix a checkpatch warn WARNING: sizeof rs5c->buf should be sizeof(rs5c->buf) Signed-off-by: Shubhrajyoti D --- drivers/rtc/rtc-rs5c372.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/drivers/rtc/rtc-rs5c372.c b/drivers/rtc/rtc-rs5c372.c index fb4842c..76f565a 100644 --- a/drivers/rtc/rtc-rs5c372.c +++ b/drivers/rtc/rtc-rs5c372.c @@ -104,7 +104,12 @@ static int rs5c_get_regs(struct rs5c372 *rs5c) { struct i2c_client *client = rs5c->client; struct i2c_msg msgs[] = { - { client->addr, I2C_M_RD, sizeof rs5c->buf, rs5c->buf }, + { + .addr = client->addr, + .flags = I2C_M_RD, + .len = sizeof(rs5c->buf), + .buf = rs5c->buf + }, }; /* This implements the third reading method from the datasheet, using