From patchwork Tue Apr 17 16:39:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brad Love X-Patchwork-Id: 10345933 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5BDA8601D7 for ; Tue, 17 Apr 2018 16:40:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 48A41284BD for ; Tue, 17 Apr 2018 16:40:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4668A28569; Tue, 17 Apr 2018 16:40:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3A1C028587 for ; Tue, 17 Apr 2018 16:40:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755092AbeDQQkm (ORCPT ); Tue, 17 Apr 2018 12:40:42 -0400 Received: from sub5.mail.dreamhost.com ([208.113.200.129]:51052 "EHLO homiemail-a48.g.dreamhost.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754697AbeDQQkY (ORCPT ); Tue, 17 Apr 2018 12:40:24 -0400 Received: from homiemail-a48.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a48.g.dreamhost.com (Postfix) with ESMTP id 9516270A0D0D; Tue, 17 Apr 2018 09:40:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=nextdimension.cc; h=from :to:cc:subject:date:message-id:in-reply-to:references; s= nextdimension.cc; bh=l2cFpV6aprEqYqmEL0KddF1AbUc=; b=RpZznvQLdlk pS85tHf3m0YAbgSKLFn9f8q+JyMpHf8Pd4z8qNyQ7vAJoRwHTHuyjMFrOQsxRY3Q EJgAo1/j3swMzpqODPZBHjCujALZBt+Qx4s32KsOl37slWKkHSEPX/mYGdMfxTOV 1yCrA0ZFrLxR0FP/JcRkgyUzQPd9RAZQ= Received: from localhost.localdomain (66-90-189-166.dyn.grandenetworks.net [66.90.189.166]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: brad@nextdimension.ws) by homiemail-a48.g.dreamhost.com (Postfix) with ESMTPSA id 430C170A0D11; Tue, 17 Apr 2018 09:40:24 -0700 (PDT) From: Brad Love To: linux-media@vger.kernel.org, mchehab@s-opensource.com Cc: Brad Love Subject: [PATCH 3/9] cx231xx: Style fix for struct zero init Date: Tue, 17 Apr 2018 11:39:49 -0500 Message-Id: <1523983195-28691-4-git-send-email-brad@nextdimension.cc> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523983195-28691-1-git-send-email-brad@nextdimension.cc> References: <1523983195-28691-1-git-send-email-brad@nextdimension.cc> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Replace zero fill memset inits with equivalent {} in declaration Signed-off-by: Brad Love --- drivers/media/usb/cx231xx/cx231xx-dvb.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/media/usb/cx231xx/cx231xx-dvb.c b/drivers/media/usb/cx231xx/cx231xx-dvb.c index 99f1a77..12f2dcc 100644 --- a/drivers/media/usb/cx231xx/cx231xx-dvb.c +++ b/drivers/media/usb/cx231xx/cx231xx-dvb.c @@ -787,10 +787,9 @@ static int dvb_init(struct cx231xx *dev) { struct i2c_client *client; struct i2c_board_info info; - struct si2165_platform_data si2165_pdata; + struct si2165_platform_data si2165_pdata = {}; /* attach demod */ - memset(&si2165_pdata, 0, sizeof(si2165_pdata)); si2165_pdata.fe = &dev->dvb->frontend[0]; si2165_pdata.chip_mode = SI2165_MODE_PLL_XTAL; si2165_pdata.ref_freq_hz = 16000000; @@ -832,11 +831,10 @@ static int dvb_init(struct cx231xx *dev) { struct i2c_client *client; struct i2c_board_info info; - struct si2165_platform_data si2165_pdata; - struct si2157_config si2157_config; + struct si2165_platform_data si2165_pdata = {}; + struct si2157_config si2157_config = {}; /* attach demod */ - memset(&si2165_pdata, 0, sizeof(si2165_pdata)); si2165_pdata.fe = &dev->dvb->frontend[0]; si2165_pdata.chip_mode = SI2165_MODE_PLL_EXT; si2165_pdata.ref_freq_hz = 24000000; @@ -870,7 +868,6 @@ static int dvb_init(struct cx231xx *dev) dvb->frontend[0]->callback = cx231xx_tuner_callback; /* attach tuner */ - memset(&si2157_config, 0, sizeof(si2157_config)); si2157_config.fe = dev->dvb->frontend[0]; #ifdef CONFIG_MEDIA_CONTROLLER_DVB si2157_config.mdev = dev->media_dev; @@ -907,7 +904,7 @@ static int dvb_init(struct cx231xx *dev) { struct i2c_client *client; struct i2c_board_info info; - struct si2157_config si2157_config; + struct si2157_config si2157_config = {}; memset(&info, 0, sizeof(struct i2c_board_info)); @@ -929,7 +926,6 @@ static int dvb_init(struct cx231xx *dev) dvb->frontend[0]->callback = cx231xx_tuner_callback; /* attach tuner */ - memset(&si2157_config, 0, sizeof(si2157_config)); si2157_config.fe = dev->dvb->frontend[0]; #ifdef CONFIG_MEDIA_CONTROLLER_DVB si2157_config.mdev = dev->media_dev;