From patchwork Tue Sep 25 11:32:04 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Datta, Shubhrajyoti" X-Patchwork-Id: 186781 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-vc0-f184.google.com (mail-vc0-f184.google.com [209.85.220.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 D6FB12C008D for ; Tue, 25 Sep 2012 21:32:21 +1000 (EST) Received: by vcqp16 with SMTP id p16sf5635146vcq.11 for ; Tue, 25 Sep 2012 04:32:19 -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=bwpV59ji1YvZP68jXEwth0bv1d1p6Zi3zKiF3VNLeu3dcqIUMqkCvvB3uzCC5UWKTb e2njeYJSGfwR4yRZWvqbic5ge0foWIq5AtREbCvpaqkxwXL5vLiW1KhoIiOud/IgNP6O Ju8uoux+8w/P1T9cq6AnvvAwfIrvjJfbjXrnPEJSS4GH7G96IV8eM/EbfLDsUSuYBnjN JCzGFTm/GScqHHf5BCaUo8l7pFtTZPRqG74b75H1yAQTs72AuuBFRsV9kJH7w2yDdpn6 rwJ9WoOM/uA+/XYUV86ShOFItOD2rNwcL9h/p/q3EpGnBe3XQ0KyD2edmt+P32WNH5UJ z1DQ== Received: by 10.50.36.135 with SMTP id q7mr3973272igj.4.1348572739373; Tue, 25 Sep 2012 04:32:19 -0700 (PDT) X-BeenThere: rtc-linux@googlegroups.com Received: by 10.50.51.234 with SMTP id n10ls4815652igo.3.canary; Tue, 25 Sep 2012 04:32:19 -0700 (PDT) Received: by 10.42.212.133 with SMTP id gs5mr3503239icb.22.1348572738956; Tue, 25 Sep 2012 04:32:18 -0700 (PDT) Received: by 10.42.212.133 with SMTP id gs5mr3503238icb.22.1348572738946; Tue, 25 Sep 2012 04:32:18 -0700 (PDT) Received: from devils.ext.ti.com (devils.ext.ti.com. [198.47.26.153]) by gmr-mx.google.com with ESMTPS id dd6si10547igc.0.2012.09.25.04.32.18 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 25 Sep 2012 04:32:18 -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 q8PBWGQq006301; Tue, 25 Sep 2012 06:32:17 -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 q8PBWDMO015632; Tue, 25 Sep 2012 17:02:16 +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; Tue, 25 Sep 2012 17:02:14 +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 q8PBW8pa015322; Tue, 25 Sep 2012 17:02:13 +0530 From: Shubhrajyoti D To: CC: , , , , Shubhrajyoti D Subject: [rtc-linux] [PATCHv3 5/7] rtc: Convert struct i2c_msg initialization to C99 format Date: Tue, 25 Sep 2012 17:02:04 +0530 Message-ID: <1348572726-6940-6-git-send-email-shubhrajyoti@ti.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1348572726-6940-1-git-send-email-shubhrajyoti@ti.com> References: <1348572726-6940-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 */