From patchwork Tue Nov 28 06:03:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10078707 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 ED23660353 for ; Tue, 28 Nov 2017 06:04:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C916B290ED for ; Tue, 28 Nov 2017 06:04:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BB61828D3F; Tue, 28 Nov 2017 06:04:15 +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=-1.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID autolearn=no 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 0880A28D3F for ; Tue, 28 Nov 2017 06:04:15 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 28740267665; Tue, 28 Nov 2017 07:04:13 +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 354DC267665; Tue, 28 Nov 2017 07:04:12 +0100 (CET) Received: from relmlie1.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa0.perex.cz (Postfix) with ESMTP id B3D7E26766E for ; Tue, 28 Nov 2017 07:03:55 +0100 (CET) Received: from unknown (HELO relmlir2.idc.renesas.com) ([10.200.68.152]) by relmlie1.idc.renesas.com with ESMTP; 28 Nov 2017 15:03:51 +0900 Received: from relmlii2.idc.renesas.com (relmlii2.idc.renesas.com [10.200.68.66]) by relmlir2.idc.renesas.com (Postfix) with ESMTP id BC89F7FD26; Tue, 28 Nov 2017 15:03:51 +0900 (JST) X-IronPort-AV: E=Sophos;i="5.44,467,1505746800"; d="scan'208";a="264748556" Received: from mail-sg2apc01lp0239.outbound.protection.outlook.com (HELO APC01-SG2-obe.outbound.protection.outlook.com) ([65.55.88.239]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-SHA256; 28 Nov 2017 15:03:50 +0900 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; bh=6eb2PWADJ0BQbGcLfT5BrVEkZ2SKTxO31NL+ajRi5qU=; b=qArBBPzRYV1EDKjPEbpPJeVwaBA4084KmPxbA7Xpvn9+QDTr+Z1p2uyMGLZk2LMQKaiXVkC01g2btyPlac9zcwj/oGXAfmbzAyqQ0ufKXMSURDwQ9i8fIHxdgICwr7CKe6GhxMwz1J/GgyQHSqj6vOmw08oxb6f6ZqfL1tqarws= Received: from morimoto-PC.renesas.com (211.11.155.138) by PS1PR0601MB1881.apcprd06.prod.outlook.com (2603:1096:803:8::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.260.4; Tue, 28 Nov 2017 06:03:48 +0000 Message-ID: <87wp2bt0bc.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: <87zi77t0cr.wl%kuninori.morimoto.gx@renesas.com> References: <87zi77t0cr.wl%kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Date: Tue, 28 Nov 2017 06:03:48 +0000 X-Originating-IP: [211.11.155.138] X-ClientProxiedBy: HK2PR02CA0207.apcprd02.prod.outlook.com (2603:1096:201:20::19) To PS1PR0601MB1881.apcprd06.prod.outlook.com (2603:1096:803:8::19) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 95b6efda-0021-4075-33b4-08d53625cae9 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(48565401081)(2017052603258); SRVR:PS1PR0601MB1881; X-Microsoft-Exchange-Diagnostics: 1; PS1PR0601MB1881; 3:SoDqup2mUuC9YbhI5liYfofknuQqY4VZ/wchW5xET4L3CZFLMJGSmgKH1BLlh+aXgII1iaI1GsgTgL1If1wfgo1chOk/JtHqfEVcanVX1TiywQSvg9ciJXBaqBSdsv5Wa7wHuIgolePDs0wMjDh7yWD2o7rrDt2lGBRD4JeowHCOQvkFV7uKbfJUwBbxA4wTibPOuu8ceDfGVENpz7bKXA5YJDSL0If7Ns3F51DT4CkyB983idi3APQHFZUyNChI; 25:m4rp/ISLK9dpCJemkGH15wVc/p9w7agFfVNmL3wT63gy9GgIM4ryvEcjpmSsO9FQz0BmkBQJ44TZXCwboo8vAn5SWdX4kOjEm/P0GM4ZUGVV+g7uZk1PXp2dkk6DdIfgpLq/i00JSYR3ggTe+5B9jttWGYEfRtnnsZndJyLg4aht/RqOswAMJ7mNZRzu/MYk3g0TR89MtkcXhjNpO6L90qOskGhyA7toDZ0UVP1zqKEjQVucWK/9+XMRjswbLhzPRKnH4g1yks/WYSbKb0JLAhaBmeDgMOQ7NPB2x2wZ4vIQAGIofhXv2KEBG4+VmQG3FfISkn4GjyFl1baDfJRuPA==; 31:S1MaABifOJ8C5zwoYg3gDzla/l2dx+HDfcIKeit9FcKr4RrngTiHOT4A8JH0CUohjGn6N0+kAe2xpB3bQK2rDca1bnUqdf2CzGS8Cl1tFCue3bcuQizdxQ5TRCalfcEKJd2epdMg5nY7fcdis6GymezVt9RHTTHONClj9cKfiSeEIZm40HGxOX3j2IGWlTwtdyDrguXekkNb9efwU+qk43CmywawDHKCTqY3aACOuiw= X-MS-TrafficTypeDiagnostic: PS1PR0601MB1881: X-Microsoft-Exchange-Diagnostics: 1; PS1PR0601MB1881; 20:7AOc5Dy5KJ1znZEFQbxeXVDaCXucv/eIzDzPoVXMVivhd1B86h78u/ZsfV8XPCUsZFmr7zIMeLggLfctJNHFgnlllUpgHl9NOqWI41ix4HRg3SvrOGoh4Jqc9geKSEzjsEzP2SiwSylGBjvF3+VvJWK8pum2zO/VOVgGF4z8H7DI9OLLf25FuRtJbhq3S7ZanDexT8j6dIWn/9+gPViNjquWUBUpf+OPAIKDkKNp3lZYVmyDeF4ez6nZPNfjF161QR4S5m5DF3NTFBg6vA8WCT/n4iLbCb1/qnJLTJdCTyva+YrkTurkS6x1viI2khIASt+1qts8acHSb/TPteaMCwmZ1+Vh3QjBXKfDgbZnojzFV4xuxdYa63+SIw3ZATFcbBIUA3au8hveICOl1gVeDPnkLdfhNvKUSuOMFyz861SPg14IGDOA8yHHmCbPcNGj3kGG4DpTJiKucVstjLU1cy8fPCqBvcHQtn78lGE1s5AXCW8MTNnTSI+YCyFGKAbC; 4:BB40IAtRNOq+DK1NFP1Y1ythRFSPbMEN4IxagUyuomwkdumNSbOUqT6Z15flxC+JMbixB9rwT4hgaXZLoslzu4zQaOf6uM+Sb9ngkp8SI3jtomZbscCRQ1RA9yu0uXwC6+iH2GpI/dsK14h1HW9/gSs4suDZYMkRKTj95T3fbfOgxNVyYQ+ASKD5/b4NsVAWoNPO/frcLTTXtQlN9Kh9kXmo4wlZJc5Ol8GRdz5h1oowCKqsUz6YT5v8sHkFH67C7HjwqvgyZML6MHfvpPG80g== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(5005006)(8121501046)(93006095)(93001095)(3002001)(10201501046)(3231022)(6055026)(6041248)(20161123562025)(20161123558100)(20161123560025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(6072148)(201708071742011); SRVR:PS1PR0601MB1881; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:PS1PR0601MB1881; X-Forefront-PRVS: 0505147DDB X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(39860400002)(366004)(376002)(346002)(199003)(189002)(101416001)(5660300001)(25786009)(50466002)(66066001)(54356999)(50986999)(76176999)(6916009)(2950100002)(305945005)(7736002)(53416004)(4326008)(47776003)(478600001)(53936002)(36756003)(68736007)(83506002)(3846002)(33646002)(69596002)(16526018)(97736004)(6116002)(58126008)(8676002)(16586007)(105586002)(23726003)(54906003)(2906002)(86362001)(52116002)(7696005)(8936002)(81166006)(81156014)(316002)(6486002)(189998001)(106356001)(16060500001); DIR:OUT; SFP:1102; SCL:1; SRVR:PS1PR0601MB1881; H:morimoto-PC.renesas.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: renesas.com does not designate permitted sender hosts) Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=kuninori.morimoto.gx@renesas.com; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; PS1PR0601MB1881; 23:7HFrYC0Wul2vHPdZvkNdDBYgcEwGPSHN90zl4w5?= =?us-ascii?Q?jmcjw+9DnZTGFFUt5Ha/9cdqSJcIM0Qy4QK7qx7pz2+17ncWpNY2h62JdJTU?= =?us-ascii?Q?RH6XIp5VOI2u34EvCIr3Qm02uBLuzl3Uidn0WRxE1Y0jsnZ2MmfMifdfy69g?= =?us-ascii?Q?feWUlgzf/KOKIQYbcgial3OtMAdtqAKDv+MIL8nWLWLfgQLF3a6v+ma8kY75?= =?us-ascii?Q?O1utScgbwBbWPjd1/iYpHeJ0IHeKsoFEaIpNs66J66Sr6U7PHLcMVz2jhzfu?= =?us-ascii?Q?gfM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R0601MB1881; 20:ARMb3J70JJkMrnWiJxH+a0+0HA5HQLS2XN25LO3bTuVSGnGxoADkluCqiHUCbGI1pF/uWeF5J6GYowKfqYm5TZ7seQOihRBlHIS/ECUXjh/Jav8NmAox8wqX1eIHcpl537uH4FCGdavuuklEJn+XrQtjIYpuiRlnv5mmt4Wfvp0= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Nov 2017 06:03:48.2670 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 95b6efda-0021-4075-33b4-08d53625cae9 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: PS1PR0601MB1881 Cc: Linux-ALSA , Simon Subject: [alsa-devel] [PATCH 02/14] ASoC: use snd_soc_component_init_regmap() on wm8997 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 To setup regmap, ALSA SoC has snd_soc_component_init_regmap() and .get_regmap. But these are duplicated feature. Let's use snd_soc_component_init_regmap() and remove .get_regmap Signed-off-by: Kuninori Morimoto --- sound/soc/codecs/wm8997.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/sound/soc/codecs/wm8997.c b/sound/soc/codecs/wm8997.c index 77f5127..cac9b3e 100644 --- a/sound/soc/codecs/wm8997.c +++ b/sound/soc/codecs/wm8997.c @@ -1062,8 +1062,11 @@ static int wm8997_codec_probe(struct snd_soc_codec *codec) struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec); struct snd_soc_component *component = snd_soc_dapm_to_component(dapm); struct wm8997_priv *priv = snd_soc_codec_get_drvdata(codec); + struct arizona *arizona = priv->core.arizona; int ret; + snd_soc_codec_init_regmap(codec, arizona->regmap); + ret = arizona_init_spk(codec); if (ret < 0) return ret; @@ -1095,17 +1098,9 @@ static int wm8997_codec_remove(struct snd_soc_codec *codec) ARIZONA_DAC_DIGITAL_VOLUME_5R, }; -static struct regmap *wm8997_get_regmap(struct device *dev) -{ - struct wm8997_priv *priv = dev_get_drvdata(dev); - - return priv->core.arizona->regmap; -} - static const struct snd_soc_codec_driver soc_codec_dev_wm8997 = { .probe = wm8997_codec_probe, .remove = wm8997_codec_remove, - .get_regmap = wm8997_get_regmap, .idle_bias_off = true,