From patchwork Tue May 10 14:02:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102372 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp2146222qge; Tue, 10 May 2016 07:03:58 -0700 (PDT) X-Received: by 10.28.152.19 with SMTP id a19mr16802038wme.60.1462889038687; Tue, 10 May 2016 07:03:58 -0700 (PDT) Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id k203si16477752wmd.110.2016.05.10.07.03.58; Tue, 10 May 2016 07:03:58 -0700 (PDT) Received-SPF: neutral (google.com: 77.48.224.243 is neither permitted nor denied by best guess record for domain of alsa-devel-bounces@alsa-project.org) client-ip=77.48.224.243; Authentication-Results: mx.google.com; spf=neutral (google.com: 77.48.224.243 is neither permitted nor denied by best guess record for domain of alsa-devel-bounces@alsa-project.org) smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 7AE08265593; Tue, 10 May 2016 16:03:57 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.2.4 Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 43B3F2651FC; Tue, 10 May 2016 16:03:49 +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 3E05326523B; Tue, 10 May 2016 16:03:48 +0200 (CEST) Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.75]) by alsa0.perex.cz (Postfix) with ESMTP id 2A2C1261600 for ; Tue, 10 May 2016 16:03:41 +0200 (CEST) Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue102) with ESMTPA (Nemesis) id 0MIe7s-1b2K6N1Shs-002E1M; Tue, 10 May 2016 16:02:27 +0200 From: Arnd Bergmann To: Linus Walleij Date: Tue, 10 May 2016 16:02:05 +0200 Message-Id: <1462888941-2810783-1-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 X-Provags-ID: V03:K0:JAs4a5KcmIvEUNs3SN3fDcmn5ZgaOdxNnrwlU97Cf3V9ioUSLgL vDb24KFMy+xSuq5u3glIg+AseA0Rv1V/xiDWVU/1lAZHBeucnKKpbW60LsOnCYUAjPGB44t yak39fhMIa+wv3XzWx17iIrjw3iNfHxz3HWBePxrxxapHaBlX9k8feMVEBH3VNfHL71cB8O oGnDIzHJvj7tSeMZBVbaw== X-UI-Out-Filterresults: notjunk:1; V01:K0:5+zsrqzh3ww=:QO0/wwkr0VCdOLX3ktlruy q2ukmNMMOi/Roys4OXw+Xj7Na7FIQwDCm+419vC2JKz5tUsVXe95L1XCY9SPouchR6hjWnYps zJE4/yM1gyn4OrU4GUjyr1+4SL0vs06wtyTiSD92+7q6klhZSnOIIPH3zG0s0y83O+nur0B9/ lwB5CcIpgoV2e1W5kKVP0x7ggSvEXQOlHKoOc3RA8ew1s88rDlRq8HU7ENWkKJipb+RLOicaP iABnlfVA9t0td5omQvrmzLCQF5J2eyl/bpoaNCRX/+vxkXjwYt0BTNZr+m5zoV3te7Tv+GK9F U4TyIEwrjgc/yT7ml4sL3VWDNlQzuxPO1Xfw1wM6AybCtXvg82OQt1qs8oWetonfa5jVln/V0 CR2yg6WL8ixUc82m4t6K5GYuBVNEnZQnAdyrP6yoShkAejfy7xw3R2ai9ZujCkKqfJsTKEj1J pPwSIuLVu5UfgLQFKZnvkh+Qe9SnhHHGevxEGW2DqnTRtjTqVOwyPfbmERvM4LBoIU1v4Vy0E DfU1OW6xfy1FV3Z8bM4NIbUbguc/OI8wzseCGSuBDD4gmiuBHQMuQrObGgJnQMqXbD8z6HrxD zNQYAf3FLOUAqQSPoOouPqHoQH1iWnCFaruhhZTz1CG0v1VbtRJ5xo1/mLO+BwPLCI/qkygDi LjcN9Yh1Wv0AoHm8axO6mNN3dpHI4uZdh/tS+5Okl4NjNy+cNUwayB8Lma2mAMc1QtfM= Cc: Xiubo Li , Lars-Peter Clausen , Arnd Bergmann , linux-kernel@vger.kernel.org, Takashi Iwai , Liam Girdwood , Mark Brown , alsa-devel@alsa-project.org, Lee Jones , linux-arm-kernel@lists.infradead.org Subject: [alsa-devel] [PATCH 3/4] ASoC: ab8500-codec: remove platform data based probe 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org The ux500 platform hasn't used board files for a long time, and nothing defines a ab8500_codec_platform_data, so we can just remove the probing based on that and always use device tree properties directly. Signed-off-by: Arnd Bergmann --- sound/soc/codecs/ab8500-codec.c | 33 ++++----------------------------- 1 file changed, 4 insertions(+), 29 deletions(-) -- 2.7.0 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel diff --git a/sound/soc/codecs/ab8500-codec.c b/sound/soc/codecs/ab8500-codec.c index 8b1d0c1a7839..2fc89155f14a 100644 --- a/sound/soc/codecs/ab8500-codec.c +++ b/sound/soc/codecs/ab8500-codec.c @@ -2464,45 +2464,20 @@ static int ab8500_codec_probe(struct snd_soc_codec *codec) struct device *dev = codec->dev; struct device_node *np = dev->of_node; struct ab8500_codec_drvdata *drvdata = dev_get_drvdata(dev); - struct ab8500_platform_data *pdata; + struct ab8500_codec_platform_data codec_pdata; struct filter_control *fc; int status; dev_dbg(dev, "%s: Enter.\n", __func__); - /* Setup AB8500 according to board-settings */ - pdata = dev_get_platdata(dev->parent); + ab8500_codec_of_probe(dev, np, &codec_pdata); - if (np) { - if (!pdata) - pdata = devm_kzalloc(dev, - sizeof(struct ab8500_platform_data), - GFP_KERNEL); - - if (pdata && !pdata->codec) - pdata->codec - = devm_kzalloc(dev, - sizeof(struct ab8500_codec_platform_data), - GFP_KERNEL); - - if (!(pdata && pdata->codec)) - return -ENOMEM; - - ab8500_codec_of_probe(dev, np, pdata->codec); - - } else { - if (!(pdata && pdata->codec)) { - dev_err(dev, "No codec platform data or DT found\n"); - return -EINVAL; - } - } - - status = ab8500_audio_setup_mics(codec, &pdata->codec->amics); + status = ab8500_audio_setup_mics(codec, &codec_pdata.amics); if (status < 0) { pr_err("%s: Failed to setup mics (%d)!\n", __func__, status); return status; } - status = ab8500_audio_set_ear_cmv(codec, pdata->codec->ear_cmv); + status = ab8500_audio_set_ear_cmv(codec, codec_pdata.ear_cmv); if (status < 0) { pr_err("%s: Failed to set earpiece CM-voltage (%d)!\n", __func__, status);