From patchwork Thu Apr 24 11:14:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolin Chen X-Patchwork-Id: 4049581 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BC8A39F3E2 for ; Thu, 24 Apr 2014 11:14:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 006C52017A for ; Thu, 24 Apr 2014 11:14:29 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id D0FBC201B4 for ; Thu, 24 Apr 2014 11:14:27 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id E5E4A265312; Thu, 24 Apr 2014 13:14:26 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 8266C265284; Thu, 24 Apr 2014 13:12:45 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 1A4DC26528B; Thu, 24 Apr 2014 13:12:44 +0200 (CEST) Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1blp0186.outbound.protection.outlook.com [207.46.163.186]) by alsa0.perex.cz (Postfix) with ESMTP id 525F2265253 for ; Thu, 24 Apr 2014 13:12:30 +0200 (CEST) Received: from BY2PR03CA067.namprd03.prod.outlook.com (10.141.249.40) by BY2PR03MB026.namprd03.prod.outlook.com (10.255.240.40) with Microsoft SMTP Server (TLS) id 15.0.921.12; Thu, 24 Apr 2014 11:12:27 +0000 Received: from BL2FFO11FD051.protection.gbl (2a01:111:f400:7c09::178) by BY2PR03CA067.outlook.office365.com (2a01:111:e400:2c5d::40) with Microsoft SMTP Server (TLS) id 15.0.929.12 via Frontend Transport; Thu, 24 Apr 2014 11:12:26 +0000 Received: from az84smr01.freescale.net (192.88.158.246) by BL2FFO11FD051.mail.protection.outlook.com (10.173.161.213) with Microsoft SMTP Server (TLS) id 15.0.929.8 via Frontend Transport; Thu, 24 Apr 2014 11:12:26 +0000 Received: from rio.ap.freescale.net (rio.ap.freescale.net [10.192.242.9]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id s3OBCBU9019332; Thu, 24 Apr 2014 04:12:23 -0700 From: Nicolin Chen To: Date: Thu, 24 Apr 2014 19:14:00 +0800 Message-ID: <8270833b6e3d1d2b6c4d20397c33b3cd645e8e38.1398337861.git.Guangyu.Chen@freescale.com> X-Mailer: git-send-email 1.8.4 In-Reply-To: References: X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:192.88.158.246; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009001)(6009001)(428001)(199002)(189002)(77982001)(4396001)(48376002)(19580405001)(19580395003)(83322001)(50226001)(88136002)(20776003)(46102001)(44976005)(47776003)(80976001)(80022001)(76482001)(87286001)(87936001)(99396002)(76176999)(77096999)(6806004)(79102001)(74662001)(62966002)(31966008)(86362001)(89996001)(74502001)(81542001)(36756003)(92726001)(50986999)(50466002)(92566001)(81342001)(77156001)(93916002)(85852003)(83072002); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR03MB026; H:az84smr01.freescale.net; FPR:DFD434E.2EC6720A.40DD53B3.42C62242.2023A; MLV:sfv; PTR:gate-az5.freescale.com; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-Forefront-PRVS: 01917B1794 Received-SPF: None (: freescale.com does not designate permitted sender hosts) X-OriginatorOrg: freescale.com Cc: moinejf@free.fr, alsa-devel@alsa-project.org, kuninori.morimoto.gx@renesas.com, tiwai@suse.de, lgirdwood@gmail.com, jsarha@ti.com Subject: [alsa-devel] [PATCH 3/3] ASoC: simple-card: Improve coding style X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Improve indentation and space. Signed-off-by: Nicolin Chen --- sound/soc/generic/simple-card.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c index c091557..98f97e5 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c @@ -66,8 +66,7 @@ err: static int asoc_simple_card_dai_init(struct snd_soc_pcm_runtime *rtd) { - struct simple_card_data *priv = - snd_soc_card_get_drvdata(rtd->card); + struct simple_card_data *priv = snd_soc_card_get_drvdata(rtd->card); struct snd_soc_dai *codec = rtd->codec_dai; struct snd_soc_dai *cpu = rtd->cpu_dai; struct simple_dai_props *dai_props; @@ -177,7 +176,7 @@ static int simple_card_dai_link_of(struct device_node *node, goto dai_link_of_err; dai_props->cpu_dai.fmt = daifmt; - switch (((np == bitclkmaster)<<4)|(np == framemaster)) { + switch (((np == bitclkmaster) << 4) | (np == framemaster)) { case 0x11: dai_props->cpu_dai.fmt |= SND_SOC_DAIFMT_CBS_CFS; break; @@ -218,7 +217,7 @@ static int simple_card_dai_link_of(struct device_node *node, (daifmt & ~SND_SOC_DAIFMT_CLOCK_MASK); } else { dai_props->codec_dai.fmt = daifmt; - switch (((np == bitclkmaster)<<4)|(np == framemaster)) { + switch (((np == bitclkmaster) << 4) | (np == framemaster)) { case 0x11: dai_props->codec_dai.fmt |= SND_SOC_DAIFMT_CBM_CFM; break; @@ -235,8 +234,8 @@ static int simple_card_dai_link_of(struct device_node *node, } if (!dai_link->cpu_dai_name || !dai_link->codec_dai_name) { - ret = -EINVAL; - goto dai_link_of_err; + ret = -EINVAL; + goto dai_link_of_err; } /* simple-card assumes platform == cpu */ @@ -417,10 +416,10 @@ static int asoc_simple_card_probe(struct platform_device *pdev) return -EINVAL; } - if (!cinfo->name || - !cinfo->codec_dai.name || - !cinfo->codec || - !cinfo->platform || + if (!cinfo->name || + !cinfo->codec_dai.name || + !cinfo->codec || + !cinfo->platform || !cinfo->cpu_dai.name) { dev_err(dev, "insufficient asoc_simple_card_info settings\n"); return -EINVAL; @@ -464,11 +463,11 @@ MODULE_DEVICE_TABLE(of, asoc_simple_of_match); static struct platform_driver asoc_simple_card = { .driver = { - .name = "asoc-simple-card", + .name = "asoc-simple-card", .owner = THIS_MODULE, .of_match_table = asoc_simple_of_match, }, - .probe = asoc_simple_card_probe, + .probe = asoc_simple_card_probe, }; module_platform_driver(asoc_simple_card);