From patchwork Wed Nov 21 02:11:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10691551 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B7D5913AD for ; Wed, 21 Nov 2018 02:11:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9F68A2B1EA for ; Wed, 21 Nov 2018 02:11:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 93B652B1EE; Wed, 21 Nov 2018 02:11:22 +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=-2.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DAAE62B1EA for ; Wed, 21 Nov 2018 02:11:21 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id B0F21267A75; Wed, 21 Nov 2018 03:11:20 +0100 (CET) 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 B1F8F267A7E; Wed, 21 Nov 2018 03:11:18 +0100 (CET) Received: from JPN01-TY1-obe.outbound.protection.outlook.com (mail-eopbgr1400117.outbound.protection.outlook.com [40.107.140.117]) by alsa0.perex.cz (Postfix) with ESMTP id A07AB267A75 for ; Wed, 21 Nov 2018 03:11:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesasgroup.onmicrosoft.com; s=selector1-renesas-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VoRg4oQcD/eyEPRE7phw9o2euA4g01VyTYMp1oV/HQw=; b=ODeZFgPLec6UT83I8/JXFH1pXXTgLqqJt4IVqgAR0Kh3AaJzzza9NVr14rR0jyruOaO5cF7fh0Jt1t6Ee/7TZvG+KRqVGgl0ACqn/fFtu09bCiAKkmxfkEHT1lH+okvFEsTbOtyZlliv1vnNykZGurWxwpamdX9+DxD46gIzDLw= Received: from TYAPR01MB3328.jpnprd01.prod.outlook.com (20.178.136.81) by TYAPR01MB3936.jpnprd01.prod.outlook.com (20.178.139.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1339.24; Wed, 21 Nov 2018 02:11:13 +0000 Received: from TYAPR01MB3328.jpnprd01.prod.outlook.com ([fe80::19d4:7f22:a842:9f67]) by TYAPR01MB3328.jpnprd01.prod.outlook.com ([fe80::19d4:7f22:a842:9f67%4]) with mapi id 15.20.1339.027; Wed, 21 Nov 2018 02:11:13 +0000 From: Kuninori Morimoto To: Mark Brown Thread-Topic: [PATCH 4/4] ASoC: simple_card_utils: remove "option" from asoc_simple_card_of_parse_routing() Thread-Index: AQHUgT96eHJIW+eIQUeoIm5JKyCERg== Date: Wed, 21 Nov 2018 02:11:13 +0000 Message-ID: <87r2ffp4rs.wl-kuninori.morimoto.gx@renesas.com> References: <87wop7p4wk.wl-kuninori.morimoto.gx@renesas.com> In-Reply-To: <87wop7p4wk.wl-kuninori.morimoto.gx@renesas.com> Accept-Language: ja-JP, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: TYAPR01CA0110.jpnprd01.prod.outlook.com (2603:1096:404:2a::26) To TYAPR01MB3328.jpnprd01.prod.outlook.com (2603:1096:404:bb::17) authentication-results: spf=none (sender IP is ) smtp.mailfrom=kuninori.morimoto.gx@renesas.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [211.11.155.130] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; TYAPR01MB3936; 20:7qGH06Y3b4YG2QVn1GirgTTMIBGKoiJklnkNnH2xNDLNpRf2qu0Rvl3y1JXCgj3QBbeb9Tu169NnjCeJGhRLFd/V7qq6lnGVFvMBkmRWoqcW2BF+kd7xIXEW6S5H73EZvoHOBpQaXOwr9vxIl3EvXuTv1O1YJiiukasLat5dzcI= x-ms-office365-filtering-correlation-id: 6afc7c2d-1033-4246-2e21-08d64f569c8c x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390098)(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:TYAPR01MB3936; x-ms-traffictypediagnostic: TYAPR01MB3936: x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231442)(944501410)(52105112)(93006095)(93001095)(3002001)(10201501046)(6055026)(148016)(149066)(150057)(6041310)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(201708071742011)(7699051)(76991095); SRVR:TYAPR01MB3936; BCL:0; PCL:0; RULEID:; SRVR:TYAPR01MB3936; x-forefront-prvs: 08635C03D4 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39840400004)(366004)(136003)(376002)(346002)(396003)(189003)(199004)(5660300001)(25786009)(2906002)(6116002)(6512007)(3846002)(7736002)(386003)(53936002)(6506007)(305945005)(81166006)(8936002)(8676002)(81156014)(4326008)(14454004)(97736004)(36756003)(2900100001)(71200400001)(478600001)(71190400001)(316002)(256004)(486006)(11346002)(446003)(6916009)(99286004)(52116002)(76176011)(106356001)(86362001)(6436002)(26005)(186003)(2616005)(476003)(6486002)(68736007)(66066001)(105586002)(102836004); DIR:OUT; SFP:1102; SCL:1; SRVR:TYAPR01MB3936; H:TYAPR01MB3328.jpnprd01.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: renesas.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: R9d4zqN78guvfVYcLLdqEU7NBGmPO63VqHAt8BvvQAC0dYyJinbnsThd8JxX6zupQKPcr5KjBVCL8WzGz0KaeIRdM9ZmlgGA6kf5mQ8H5LTZ+ie4R/53x1hMPUZmR2J+VaQtk2iER/WSC1B9OUyegKCw9OebE8V/3wsRBHxpNC1GGHUyp13oFG63pQIiw6bq1YQcG6DCQwMSZGMwXNIdjeXfH1gsSWVqc55sYxnUso3VYd/k4syTV7EFz7o3xZqmDfuJYlETgAPRFd0BBmwYYvDJKWo/DjjT3Rz9rQDZuf4VQNkhBogPAxadbm/AuKGI5n1GhuFe3xouP4iKq6Q80nGan+dimJ6ZqgMAeayoOKQ= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-ID: <53B2C8F69279E047A51822556C4D96A9@jpnprd01.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6afc7c2d-1033-4246-2e21-08d64f569c8c X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Nov 2018 02:11:13.5230 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYAPR01MB3936 Cc: Linux-ALSA Subject: [alsa-devel] [PATCH 4/4] ASoC: simple_card_utils: remove "option" from asoc_simple_card_of_parse_routing() 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 From: Kuninori Morimoto asoc_simple_card_of_parse_routing() had "option" parameter to consider error handling, but it is very pointless parameter. Let's remove it. Signed-off-by: Kuninori Morimoto --- include/sound/simple_card_utils.h | 3 +-- sound/soc/generic/audio-graph-card.c | 2 +- sound/soc/generic/audio-graph-scu-card.c | 2 +- sound/soc/generic/simple-card-utils.c | 10 +++------- sound/soc/generic/simple-card.c | 2 +- sound/soc/generic/simple-scu-card.c | 2 +- 6 files changed, 8 insertions(+), 13 deletions(-) diff --git a/include/sound/simple_card_utils.h b/include/sound/simple_card_utils.h index d1f1717..6d69ed2 100644 --- a/include/sound/simple_card_utils.h +++ b/include/sound/simple_card_utils.h @@ -121,8 +121,7 @@ void asoc_simple_card_parse_convert(struct device *dev, struct asoc_simple_card_data *data); int asoc_simple_card_of_parse_routing(struct snd_soc_card *card, - char *prefix, - int optional); + char *prefix); int asoc_simple_card_of_parse_widgets(struct snd_soc_card *card, char *prefix); diff --git a/sound/soc/generic/audio-graph-card.c b/sound/soc/generic/audio-graph-card.c index 26eb6ff..101c7da 100644 --- a/sound/soc/generic/audio-graph-card.c +++ b/sound/soc/generic/audio-graph-card.c @@ -238,7 +238,7 @@ static int asoc_graph_card_parse_of(struct graph_card_data *priv) if (ret < 0) return ret; - ret = asoc_simple_card_of_parse_routing(card, NULL, 1); + ret = asoc_simple_card_of_parse_routing(card, NULL); if (ret < 0) return ret; diff --git a/sound/soc/generic/audio-graph-scu-card.c b/sound/soc/generic/audio-graph-scu-card.c index 1f75493..c469473 100644 --- a/sound/soc/generic/audio-graph-scu-card.c +++ b/sound/soc/generic/audio-graph-scu-card.c @@ -200,7 +200,7 @@ static int asoc_graph_card_parse_of(struct graph_card_data *priv) * see simple-card */ - ret = asoc_simple_card_of_parse_routing(card, NULL, 0); + ret = asoc_simple_card_of_parse_routing(card, NULL); if (ret < 0) return ret; diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c index f588c93..119f831 100644 --- a/sound/soc/generic/simple-card-utils.c +++ b/sound/soc/generic/simple-card-utils.c @@ -420,8 +420,7 @@ int asoc_simple_card_clean_reference(struct snd_soc_card *card) EXPORT_SYMBOL_GPL(asoc_simple_card_clean_reference); int asoc_simple_card_of_parse_routing(struct snd_soc_card *card, - char *prefix, - int optional) + char *prefix) { struct device_node *node = card->dev->of_node; char prop[128]; @@ -431,11 +430,8 @@ int asoc_simple_card_of_parse_routing(struct snd_soc_card *card, snprintf(prop, sizeof(prop), "%s%s", prefix, "routing"); - if (!of_property_read_bool(node, prop)) { - if (optional) - return 0; - return -EINVAL; - } + if (!of_property_read_bool(node, prop)) + return 0; return snd_soc_of_parse_audio_routing(card, prop); } diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c index 5a3f59a..ff3f9fa 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c @@ -300,7 +300,7 @@ static int asoc_simple_card_parse_of(struct simple_card_data *priv) if (ret < 0) goto card_parse_end; - ret = asoc_simple_card_of_parse_routing(card, PREFIX, 1); + ret = asoc_simple_card_of_parse_routing(card, PREFIX); if (ret < 0) goto card_parse_end; diff --git a/sound/soc/generic/simple-scu-card.c b/sound/soc/generic/simple-scu-card.c index 2d3ef6e..e650143 100644 --- a/sound/soc/generic/simple-scu-card.c +++ b/sound/soc/generic/simple-scu-card.c @@ -198,7 +198,7 @@ static int asoc_simple_card_parse_of(struct simple_card_data *priv) if (ret < 0) return ret; - ret = asoc_simple_card_of_parse_routing(card, PREFIX, 0); + ret = asoc_simple_card_of_parse_routing(card, PREFIX); if (ret < 0) return ret;