From patchwork Tue Jul 5 12:45:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 102046 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp292317qgy; Tue, 5 Jul 2016 05:47:22 -0700 (PDT) X-Received: by 10.66.155.229 with SMTP id vz5mr31486142pab.148.1467722842690; Tue, 05 Jul 2016 05:47:22 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id ae6si4095090pad.92.2016.07.05.05.47.22 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Jul 2016 05:47:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bKPjh-00021z-Px; Tue, 05 Jul 2016 12:45:57 +0000 Received: from mail-lf0-x236.google.com ([2a00:1450:4010:c07::236]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bKPjW-0001gR-TP for linux-arm-kernel@lists.infradead.org; Tue, 05 Jul 2016 12:45:48 +0000 Received: by mail-lf0-x236.google.com with SMTP id h129so134030605lfh.1 for ; Tue, 05 Jul 2016 05:45:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=97gsSASUpYgEKjNGNqRkHbkzgVYc3EepmAXGYzMf2QI=; b=Y1jCiT9NBJnSCtSVrWEPWfDpps3o+CT3sJzS7S1SqeFDvVqnJ1HwjG1fQrwPdYVMsc uqDqPxAlHDbOKrZL7+Vg2Ukwj2RTnzsioojs3j8k40lj4buf2mhX8jT9oapDWRVYSkfu MCt42YOe/5jWx487+SWsvL5NH7qb3lukmu22c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=97gsSASUpYgEKjNGNqRkHbkzgVYc3EepmAXGYzMf2QI=; b=S24n09CzrmYpQ03or4wtJwVU5FFbnu7gD8nxiTVrb7RWscc6iTB5G/E1KIRvFhhkaI lYiiovPdB/wrnS8NxK13CN67ppBpXOq0qmt5xb8i8fQbUnezRvm30eySZm+oiEK/YHW1 xii0PoQI0/+eHKzdU8bZ4znzZwhPMgWWdsTasKQfPDGtly5GnaivxqzaxiDKfFps6UQu 4jrSu7Njm+nFmdsp7NSe/Jp0JBat0n2JmFGfRvVCYoBIMVYWwuYo3v4YAmIcVAJdlRpP laz5u2qFCQ7itqdRMwSZf1aH1QRxC+3+JpUBWWQJgzDOU9vo37t2VwCWzqzeHKb7zgYk N6PA== X-Gm-Message-State: ALyK8tKuXCWi3oM4oOGDEmBnEDmvckdAAwxZXrHKUTO9qsLdgLT1myGIIWVz7WdAp9l9GWNO X-Received: by 10.25.131.200 with SMTP id f191mr4580465lfd.219.1467722727107; Tue, 05 Jul 2016 05:45:27 -0700 (PDT) Received: from localhost.localdomain ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id g29sm1022687ljg.25.2016.07.05.05.45.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Jul 2016 05:45:26 -0700 (PDT) From: Linus Walleij To: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , Mark Brown , Lee Jones Subject: [PATCH 03/11] ASoC: ab8500-codec: remove platform data based probe Date: Tue, 5 Jul 2016 14:45:02 +0200 Message-Id: <1467722710-1577-3-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 2.4.11 In-Reply-To: <1467722710-1577-1-git-send-email-linus.walleij@linaro.org> References: <1467722710-1577-1-git-send-email-linus.walleij@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160705_054547_251414_340E9691 X-CRM114-Status: GOOD ( 15.90 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:4010:c07:0:0:0:236 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Linus Walleij MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org From: Arnd Bergmann 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. Cc: Mark Brown Signed-off-by: Arnd Bergmann Signed-off-by: Linus Walleij --- Mark: if this makes sense to you, please provide an ACK so Arnd can merge this cleanup. --- sound/soc/codecs/ab8500-codec.c | 33 ++++----------------------------- 1 file changed, 4 insertions(+), 29 deletions(-) -- 2.4.11 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel Acked-by: Mark Brown Acked-by: Mark Brown 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);