From patchwork Mon Sep 17 13:58:13 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Datta, Shubhrajyoti" X-Patchwork-Id: 184419 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-gg0-f184.google.com (mail-gg0-f184.google.com [209.85.161.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 D2DF32C0080 for ; Tue, 18 Sep 2012 00:09:38 +1000 (EST) Received: by ggmo2 with SMTP id o2sf5119371ggm.11 for ; Mon, 17 Sep 2012 07:09:35 -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=v3cGSSgu8zROuRNId2F9Lt6cbXAeTZbLFwyEuVDFilw=; b=XSH4QbcVyO+9JQ3W+Q7aWjZyPZVE2LHa8O5l9DH+8AEE1u/idqZ9E6k9XTlQsG2C6B v9ogIhdT6a3B4hd/RT4VOZ7oj1E/QHVG4KCGEp3YeiAhH0pfCT8UEVehx5RG5c90mZRF DKMO5yCniRWzp2Qu1dG8+5LQUYosCmdz7dR/S2yCsdNlqnDDXukipX84bMUVrYla6rdr S/26wi9jn02HZ8Ulwx204uV0RB5WoMCwx/IgPwWFkyV0TiHgAlaI0JQNbw2Vu7QBSfL7 95rJdxxnQlRDhZez1N/V7HtvHnP5WG35Y/Ve8MiVkMqZXVTgbjmIt1TizQ9Fie6PuVao QLMg== Received: by 10.50.89.228 with SMTP id br4mr2563191igb.1.1347890304857; Mon, 17 Sep 2012 06:58:24 -0700 (PDT) X-BeenThere: rtc-linux@googlegroups.com Received: by 10.231.4.209 with SMTP id 17ls14350435ibs.6.gmail; Mon, 17 Sep 2012 06:58:24 -0700 (PDT) Received: by 10.42.73.129 with SMTP id s1mr4445384icj.21.1347890304427; Mon, 17 Sep 2012 06:58:24 -0700 (PDT) Received: by 10.42.73.129 with SMTP id s1mr4445383icj.21.1347890304414; 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 vb5si2600825igb.0.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 q8HDwMPm005552; 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 q8HDwJtX026482; 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:20 +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 q8HDwGal005802; Mon, 17 Sep 2012 19:28:20 +0530 From: Shubhrajyoti D To: CC: , , Shubhrajyoti D Subject: [rtc-linux] [PATCH 6/7] rtc: Convert struct i2c_msg initialization to C99 format Date: Mon, 17 Sep 2012 19:28:13 +0530 Message-ID: <1347890294-28467-7-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-s35390a.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/rtc-s35390a.c b/drivers/rtc/rtc-s35390a.c index c9562ce..e8c835e 100644 --- a/drivers/rtc/rtc-s35390a.c +++ b/drivers/rtc/rtc-s35390a.c @@ -50,7 +50,7 @@ static int s35390a_set_reg(struct s35390a *s35390a, int reg, char *buf, int len) { struct i2c_client *client = s35390a->client[reg]; struct i2c_msg msg[] = { - { client->addr, 0, len, buf }, + { .addr = client->addr, .flags = 0, .len = len, .buf = buf }, }; if ((i2c_transfer(client->adapter, msg, 1)) != 1) @@ -63,7 +63,7 @@ static int s35390a_get_reg(struct s35390a *s35390a, int reg, char *buf, int len) { struct i2c_client *client = s35390a->client[reg]; struct i2c_msg msg[] = { - { client->addr, I2C_M_RD, len, buf }, + { .addr = client->addr, .flags = I2C_M_RD, .len = len, .buf = buf }, }; if ((i2c_transfer(client->adapter, msg, 1)) != 1)