From patchwork Mon Mar 16 04:44:48 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 6015181 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BAC9D9F318 for ; Mon, 16 Mar 2015 04:45:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E7B58203E3 for ; Mon, 16 Mar 2015 04:45:14 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id A9608202F8 for ; Mon, 16 Mar 2015 04:45:13 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 661AE2604D8; Mon, 16 Mar 2015 05:45:12 +0100 (CET) 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 4D14B2604AF; Mon, 16 Mar 2015 05:45:04 +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 78A702604BC; Mon, 16 Mar 2015 05:45:02 +0100 (CET) Received: from relmlie2.idc.renesas.com (relmlor3.renesas.com [210.160.252.173]) by alsa0.perex.cz (Postfix) with ESMTP id 30B632604AF for ; Mon, 16 Mar 2015 05:44:52 +0100 (CET) Received: from unknown (HELO relmlir4.idc.renesas.com) ([10.200.68.154]) by relmlie2.idc.renesas.com with ESMTP; 16 Mar 2015 13:44:51 +0900 Received: from relmlac4.idc.renesas.com (relmlac4.idc.renesas.com [10.200.69.24]) by relmlir4.idc.renesas.com (Postfix) with ESMTP id B505A481B8; Mon, 16 Mar 2015 13:44:51 +0900 (JST) Received: by relmlac4.idc.renesas.com (Postfix, from userid 0) id 9FE1A480A4; Mon, 16 Mar 2015 13:44:51 +0900 (JST) Received: from relmlac4.idc.renesas.com (localhost [127.0.0.1]) by relmlac4.idc.renesas.com (Postfix) with ESMTP id 9919F480A3; Mon, 16 Mar 2015 13:44:51 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac4.idc.renesas.com with ESMTP id PAA04164; Mon, 16 Mar 2015 13:44:51 +0900 X-IronPort-AV: E=Sophos;i="5.11,407,1422889200"; d="scan'208";a="183126340" Received: from mail-sg1lp0086.outbound.protection.outlook.com (HELO APAC01-SG1-obe.outbound.protection.outlook.com) ([207.46.51.86]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-SHA; 16 Mar 2015 13:44:50 +0900 Received: from morimoto-PC.renesas.com (211.11.155.132) by HKXPR06MB312.apcprd06.prod.outlook.com (10.141.135.155) with Microsoft SMTP Server (TLS) id 15.1.112.19; Mon, 16 Mar 2015 04:44:48 +0000 Message-ID: <87d249k0ut.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto User-Agent: Wanderlust/2.15.9 Emacs/24.3 Mule/6.0 To: Mark Brown In-Reply-To: <87egopk13d.wl%kuninori.morimoto.gx@renesas.com> References: <87egopk13d.wl%kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Date: Mon, 16 Mar 2015 04:44:48 +0000 X-Originating-IP: [211.11.155.132] X-ClientProxiedBy: KAWPR01CA0017.jpnprd01.prod.outlook.com (25.161.24.27) To HKXPR06MB312.apcprd06.prod.outlook.com (10.141.135.155) Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none; X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:HKXPR06MB312; X-Forefront-Antispam-Report: BMV:1; SFV:NSPM; SFS:(10019020)(6009001)(87976001)(46406003)(122386002)(40100003)(66066001)(36756003)(92566002)(83506001)(77096005)(2950100001)(53416004)(76176999)(50986999)(42186005)(54356999)(33646002)(77156002)(86362001)(62966003)(50466002)(229853001)(19580395003)(19580405001)(110136001)(46102003); DIR:OUT; SFP:1102; SCL:1; SRVR:HKXPR06MB312; H:morimoto-PC.renesas.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5002010)(5005006); SRVR:HKXPR06MB312; BCL:0; PCL:0; RULEID:; SRVR:HKXPR06MB312; X-Forefront-PRVS: 05177D47DC X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Mar 2015 04:44:48.8167 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HKXPR06MB312 Cc: Linux-ALSA , Simon , shiiba , Liam Girdwood , Das Biju Subject: [alsa-devel] [PATCH 01/12 v2] ASoC: core: remove of_xlate_dai_name from snd_soc_component_driver 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 No one is using .of_xlate_dai_name for DT, Let's remove it. Signed-off-by: Kuninori Morimoto --- v1 -> v2 - no change include/sound/soc.h | 3 --- sound/soc/soc-core.c | 48 +++++++++++++++++++++--------------------------- 2 files changed, 21 insertions(+), 30 deletions(-) diff --git a/include/sound/soc.h b/include/sound/soc.h index bc6cfab..235db71 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -713,9 +713,6 @@ struct snd_soc_component_driver { void (*remove)(struct snd_soc_component *); /* DT */ - int (*of_xlate_dai_name)(struct snd_soc_component *component, - struct of_phandle_args *args, - const char **dai_name); void (*seq_notifier)(struct snd_soc_component *, enum snd_soc_dapm_type, int subseq); int (*stream_event)(struct snd_soc_component *, int event); diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index a85bd42..3a68f13 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -3462,39 +3462,33 @@ static int snd_soc_get_dai_name(struct of_phandle_args *args, mutex_lock(&client_mutex); list_for_each_entry(pos, &component_list, list) { + int id = -1; + if (pos->dev->of_node != args->np) continue; - if (pos->driver->of_xlate_dai_name) { - ret = pos->driver->of_xlate_dai_name(pos, - args, - dai_name); - } else { - int id = -1; - - switch (args->args_count) { - case 0: - id = 0; /* same as dai_drv[0] */ - break; - case 1: - id = args->args[0]; - break; - default: - /* not supported */ - break; - } + switch (args->args_count) { + case 0: + id = 0; /* same as dai_drv[0] */ + break; + case 1: + id = args->args[0]; + break; + default: + /* not supported */ + break; + } - if (id < 0 || id >= pos->num_dai) { - ret = -EINVAL; - continue; - } + if (id < 0 || id >= pos->num_dai) { + ret = -EINVAL; + continue; + } - ret = 0; + ret = 0; - *dai_name = pos->dai_drv[id].name; - if (!*dai_name) - *dai_name = pos->name; - } + *dai_name = pos->dai_drv[id].name; + if (!*dai_name) + *dai_name = pos->name; break; }