From patchwork Tue Sep 25 10:33:40 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Datta, Shubhrajyoti" X-Patchwork-Id: 186758 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-gh0-f184.google.com (mail-gh0-f184.google.com [209.85.160.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 D78B12C008F for ; Tue, 25 Sep 2012 20:33:56 +1000 (EST) Received: by ghbf11 with SMTP id f11sf5635347ghb.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=HmVYdTwnnKlfezbc7l4StSe8IDFajAPhXkRrvgbpq+A=; b=g2WY1VLdMbUAf765L8B7We7rDRLdSsRRL6Terbe4owwK+8W+xOap8JfxzXMJPmQqc0 TeK6vBjaRCNvBoP3ndBfuQ98DWGTndiaQG0bzihcAb/iAPdpsD8v3j1QyqXqT4GVUdNe oYyTg3QPNJfwYL7fsGET3iXPNw4Y5m1wThYt2tk9PiPvjjhlTpJANGpjXVUup/RhPIb8 IsYubz7QVxrkI5J0DsYjEK/ozUDAape7YMnnwN3YbnRVu4LwxAkrcz0f+6oc+UCEbHU7 OQ0AiBE+AOakQlzqnRe61wEL41A1ZP+dN5tq064GxGxs71pJJAm/3XXhS2xfahFlLesA RwEw== Received: by 10.50.181.193 with SMTP id dy1mr3819345igc.3.1348569234086; Tue, 25 Sep 2012 03:33:54 -0700 (PDT) X-BeenThere: rtc-linux@googlegroups.com Received: by 10.231.2.13 with SMTP id 13ls4729109ibh.1.gmail; Tue, 25 Sep 2012 03:33:53 -0700 (PDT) Received: by 10.43.9.8 with SMTP id ou8mr6384471icb.4.1348569233767; Tue, 25 Sep 2012 03:33:53 -0700 (PDT) Received: by 10.43.9.8 with SMTP id ou8mr6384470icb.4.1348569233756; 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 rf8si3848783igb.2.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 q8PAXpmj007596; Tue, 25 Sep 2012 05:33:52 -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 q8PAXn09000863; Tue, 25 Sep 2012 16:03:51 +0530 (IST) Received: from dbdp33.itg.ti.com (172.24.170.252) by DBDE71.ent.ti.com (172.24.170.149) 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 q8PAXkDm021365; Tue, 25 Sep 2012 16:03:49 +0530 From: Shubhrajyoti D To: CC: , , , Shubhrajyoti D Subject: [rtc-linux] [PATCHv2 3/7] rtc: Convert struct i2c_msg initialization to C99 format Date: Tue, 25 Sep 2012 16:03:40 +0530 Message-ID: <1348569224-4096-4-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. Signed-off-by: Shubhrajyoti D --- drivers/rtc/rtc-s35390a.c | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/rtc-s35390a.c b/drivers/rtc/rtc-s35390a.c index c9562ce..cc5c516 100644 --- a/drivers/rtc/rtc-s35390a.c +++ b/drivers/rtc/rtc-s35390a.c @@ -50,7 +50,11 @@ 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, + .len = len, + .buf = buf + }, }; if ((i2c_transfer(client->adapter, msg, 1)) != 1) @@ -63,7 +67,12 @@ 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)