From patchwork Mon Sep 24 09:47:44 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Datta, Shubhrajyoti" X-Patchwork-Id: 186346 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-ob0-f184.google.com (mail-ob0-f184.google.com [209.85.214.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 12CE62C008C for ; Mon, 24 Sep 2012 19:48:00 +1000 (EST) Received: by obbwc20 with SMTP id wc20sf4607927obb.11 for ; Mon, 24 Sep 2012 02:47:58 -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=+4jzCGnt7lRV3OWaWQrgzejl8sgxCOJlw2cQQPkjYOg=; b=F2pFYzLBvjvUSNWoiavvWXZzwVLJHgSELclfEsDMSEqOcJHh9kuVAPKXSS0YVi02cg eqCwJca1Rmfm6975WCCK5PJWWXuv0jLey+mX/k+p6EnKH9Q9ByHbUwRF7uPA9APJlbBa Z9sK9Ium8vcW6YoDEcmcLTW3oWJoYE2KCfVXZaS3sVGY3BsBeSHVcSita1a2n7ezbZ+b SLqSabkrJubGkwKJMCnkqil3MXsIxCj2ZaQiMWvWyVTKYmoANmBCY/8vQ7N5/sFXE8lq GPNgI0gECcBeQgYc3FgTFcobC7dT1Fd0IOdVF6WGYpr+LuAgP3i0n6cHPWcQ3yXiRHHc QtFg== Received: by 10.50.88.137 with SMTP id bg9mr1964128igb.0.1348480078448; Mon, 24 Sep 2012 02:47:58 -0700 (PDT) X-BeenThere: rtc-linux@googlegroups.com Received: by 10.231.62.200 with SMTP id y8ls2209458ibh.5.gmail; Mon, 24 Sep 2012 02:47:58 -0700 (PDT) Received: by 10.42.57.79 with SMTP id c15mr4858634ich.33.1348480078151; Mon, 24 Sep 2012 02:47:58 -0700 (PDT) Received: by 10.42.57.79 with SMTP id c15mr4858632ich.33.1348480078142; Mon, 24 Sep 2012 02:47:58 -0700 (PDT) Received: from devils.ext.ti.com (devils.ext.ti.com. [198.47.26.153]) by gmr-mx.google.com with ESMTPS id dd6si2959742igc.0.2012.09.24.02.47.57 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 24 Sep 2012 02:47:57 -0700 (PDT) Received-SPF: pass (google.com: domain of shubhrajyoti@ti.com designates 198.47.26.153 as permitted sender) client-ip=198.47.26.153; Received: from dbdp20.itg.ti.com ([172.24.170.38]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id q8O9ltCP012578; Mon, 24 Sep 2012 04:47:56 -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 q8O9lqTu009803; Mon, 24 Sep 2012 15:17:55 +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; Mon, 24 Sep 2012 15:17:52 +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 q8O9lmmL014192; Mon, 24 Sep 2012 15:17:52 +0530 From: Shubhrajyoti D To: CC: , , , Shubhrajyoti D Subject: [rtc-linux] [PATCHv2 5/7] rtc: Convert struct i2c_msg initialization to C99 format Date: Mon, 24 Sep 2012 15:17:44 +0530 Message-ID: <1348480066-3132-6-git-send-email-shubhrajyoti@ti.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1348480066-3132-1-git-send-email-shubhrajyoti@ti.com> References: <1348480066-3132-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 198.47.26.153 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-pcf8563.c | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/rtc-pcf8563.c b/drivers/rtc/rtc-pcf8563.c index c2fe426..98e3a2b 100644 --- a/drivers/rtc/rtc-pcf8563.c +++ b/drivers/rtc/rtc-pcf8563.c @@ -78,8 +78,17 @@ static int pcf8563_get_datetime(struct i2c_client *client, struct rtc_time *tm) unsigned char buf[13] = { PCF8563_REG_ST1 }; struct i2c_msg msgs[] = { - { client->addr, 0, 1, buf }, /* setup read ptr */ - { client->addr, I2C_M_RD, 13, buf }, /* read status + date */ + {/* setup read ptr */ + .addr = client->addr, + .len = 1, + .buf = buf + }, + {/* read status + date */ + .addr = client->addr, + .flags = I2C_M_RD, + .len = 13, + .buf = buf + }, }; /* read registers */