From patchwork Mon Sep 17 15:22:31 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shubhrajyoti Datta X-Patchwork-Id: 1467891 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 3A602DF2D8 for ; Mon, 17 Sep 2012 15:25:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756803Ab2IQPYk (ORCPT ); Mon, 17 Sep 2012 11:24:40 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:40778 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756793Ab2IQPXA (ORCPT ); Mon, 17 Sep 2012 11:23:00 -0400 Received: from dbdp20.itg.ti.com ([172.24.170.38]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id q8HFMnYX019548; Mon, 17 Sep 2012 10:22:50 -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 q8HFMmcJ014299; Mon, 17 Sep 2012 20:52:48 +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, 17 Sep 2012 20:52:47 +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 q8HFMiZj029917; Mon, 17 Sep 2012 20:52:47 +0530 From: Shubhrajyoti D To: CC: , , Shubhrajyoti D Subject: [PATCH 4/6] media: Convert struct i2c_msg initialization to C99 format Date: Mon, 17 Sep 2012 20:52:31 +0530 Message-ID: <1347895353-18090-5-git-send-email-shubhrajyoti@ti.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1347895353-18090-1-git-send-email-shubhrajyoti@ti.com> References: <1347895353-18090-1-git-send-email-shubhrajyoti@ti.com> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org 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/media/radio/radio-tea5764.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/radio/radio-tea5764.c b/drivers/media/radio/radio-tea5764.c index 6b1fae3..5dbe12e 100644 --- a/drivers/media/radio/radio-tea5764.c +++ b/drivers/media/radio/radio-tea5764.c @@ -151,8 +151,8 @@ int tea5764_i2c_read(struct tea5764_device *radio) u16 *p = (u16 *) &radio->regs; struct i2c_msg msgs[1] = { - { radio->i2c_client->addr, I2C_M_RD, sizeof(radio->regs), - (void *)&radio->regs }, + { .addr = radio->i2c_client->addr, .flags = I2C_M_RD, .len = sizeof(radio->regs), + .buf = (void *)&radio->regs }, }; if (i2c_transfer(radio->i2c_client->adapter, msgs, 1) != 1) return -EIO; @@ -167,7 +167,7 @@ int tea5764_i2c_write(struct tea5764_device *radio) struct tea5764_write_regs wr; struct tea5764_regs *r = &radio->regs; struct i2c_msg msgs[1] = { - { radio->i2c_client->addr, 0, sizeof(wr), (void *) &wr }, + { .addr = radio->i2c_client->addr, .flags = 0, .len = sizeof(wr), .buf = (void *)&wr }, }; wr.intreg = r->intreg & 0xff; wr.frqset = __cpu_to_be16(r->frqset);