From patchwork Fri Jul 13 15:36:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 141908 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp950998ljj; Fri, 13 Jul 2018 08:39:29 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd2bO/3I39+zoQfpvqFQqKvS7lFOy2wR6CbEsRmaC8ITBhybstP4xRP+suaEsWdOYxJ0+rk X-Received: by 2002:a62:df82:: with SMTP id d2-v6mr7658619pfl.189.1531496369731; Fri, 13 Jul 2018 08:39:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531496369; cv=none; d=google.com; s=arc-20160816; b=XCcypoqFAHJfmo11Ol6UvarimFIV/nZk6YoHhbhg07DMCnT8ysEUfHVeBYpc93HT5c 4Cufteg7wcog2QdnQSlBoM/MutAdobNB/rzkeg6VRPqjxvC3ASEVBGRLxxfrgUoOfntn MTnh1wO2zacZ/CxRZYM59zdeGSpr6mYfUQMirR2GjEOzdjB/YCzeO82m+RO8Q/hF0TlW 8a0G1Q4pG/PAHzsfQbK50+5ErvwCpUuC1hcHEzq2uaNPcnaU3ygHXVz1mh9PP3Mad1gt FuhUMKBitBBo9xSS2onwmyW+oyzUpYYEL+Xy52xf36IF6HRsfgiNyN+pF/DSP4C99/hg lKrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=TqQmdbUc76Zh3AKXyulvqz/9XxR8S85UTq3b7WXey3s=; b=nMhz9RhtCDR/6wxIrYHVxAm1jmrXyy5LvMdN4UmX4BjrxUVgkm54+RW3IXDWXYb3XN Z5TLoEQgGdHm5Sc1QPPepXqEylYXjwgReuavEEuxoaiCiAiWsTPuKGDbLUeSYHlrCOXk H9H+E64PMTxTcux9QndQLtSwhQ2kA5eGPUclIvawabBdqpmetWQSaxuyCtJPufEaBYRf 5z1m1Mzb829lbv96yE22PEkMoMigKLISuhXlyBPKb2LQC9MvFyZpn5J6h6oo6esD+G90 aM46t1Hxz43EmiZWxp0z6pVRJOOjoMPbcIV+1cBBexLv9j8jW8jIU+ThyKHLiMpcrd2m f+5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fJuoBeqK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o3-v6si22399969pga.609.2018.07.13.08.39.29; Fri, 13 Jul 2018 08:39:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fJuoBeqK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731886AbeGMPye (ORCPT + 31 others); Fri, 13 Jul 2018 11:54:34 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:54160 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731210AbeGMPye (ORCPT ); Fri, 13 Jul 2018 11:54:34 -0400 Received: by mail-wm0-f66.google.com with SMTP id s9-v6so1904749wmh.3 for ; Fri, 13 Jul 2018 08:39:24 -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=TqQmdbUc76Zh3AKXyulvqz/9XxR8S85UTq3b7WXey3s=; b=fJuoBeqKTg7nosmoZ7eFaF9rkHo+pyOcwXuqN9bBmcpUAAPRJwli9LxUi2SHxw9cdy RdzhQvdgyJ+dXhCRn43X2XO3PwUmpkxz1y45PWifn+pg4NlW08SzXWWWF0K28kabLTXf yeiL25dBR/R1anE1WZBBOd0C5vm4KtIHYhvyo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=TqQmdbUc76Zh3AKXyulvqz/9XxR8S85UTq3b7WXey3s=; b=Lag0VadZ73jmbNpV7MGhq6DV5t1lqQSpyXEXWAjBD450eBelYmDDaYdS3VYXlGMPHC S1EbOLIKq3HhHgPd3yRuCjFkyau9hjlMFQsEEx9cZRhVNwn96Wia5Xk8MDh2CJXTiAh6 ioA1b9EcW6be+adChmQgbcFBTydUAUdkHBdWeKC0ULgjjdgFx0FqGplMhitPX7H5AD0k T3/OSYfWrzi1ecMWiEioag4zZPPWbx4jJivySOU7Fxwz1RuwAtnc5xir8hKzPp6N8xpN gITSwoa6hnJj94lv6MqaLhTdprouS9ek9CrKxWeSyMadHvGacKfK2rYvRyJxiUH4Nmag ii8g== X-Gm-Message-State: AOUpUlFcbiYh32xaS50wvtNszHAhTe31YFi4xyLuxKaulKwITVL/TduC ur9F+J/Pz/m5O+SSG50LCpQAOA== X-Received: by 2002:a1c:9c0b:: with SMTP id f11-v6mr4200050wme.148.1531496364158; Fri, 13 Jul 2018 08:39:24 -0700 (PDT) Received: from localhost.localdomain (cpc90716-aztw32-2-0-cust92.18-1.cable.virginm.net. [86.26.100.93]) by smtp.gmail.com with ESMTPSA id 63-v6sm4840902wmo.22.2018.07.13.08.39.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 Jul 2018 08:39:23 -0700 (PDT) From: Srinivas Kandagatla To: broonie@kernel.org, lgirdwood@gmail.com, alsa-devel@alsa-project.org Cc: perex@perex.cz, tiwai@suse.com, vkoul@kernel.org, linux-kernel@vger.kernel.org, rohitkr@codeaurora.org, bgoswami@codeaurora.org, Srinivas Kandagatla Subject: [PATCH v2 3/5] ASoC: qdsp6: q6asm-dai: remove component framework related code Date: Fri, 13 Jul 2018 16:36:30 +0100 Message-Id: <20180713153632.32511-4-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180713153632.32511-1-srinivas.kandagatla@linaro.org> References: <20180713153632.32511-1-srinivas.kandagatla@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now that the component framework is integrated into the ASoC core, remove any redundant code in this driver. Signed-off-by: Srinivas Kandagatla --- sound/soc/qcom/qdsp6/q6asm-dai.c | 35 ++++------------------------------- 1 file changed, 4 insertions(+), 31 deletions(-) -- 2.16.2 diff --git a/sound/soc/qcom/qdsp6/q6asm-dai.c b/sound/soc/qcom/qdsp6/q6asm-dai.c index 199d0fb6f90a..9db9a2944ef2 100644 --- a/sound/soc/qcom/qdsp6/q6asm-dai.c +++ b/sound/soc/qcom/qdsp6/q6asm-dai.c @@ -7,7 +7,6 @@ #include #include #include -#include #include #include #include @@ -563,14 +562,15 @@ static struct snd_soc_dai_driver q6asm_fe_dais[] = { Q6ASM_FEDAI_DRIVER(8), }; -static int q6asm_dai_bind(struct device *dev, struct device *master, void *data) +static int q6asm_dai_probe(struct platform_device *pdev) { + struct device *dev = &pdev->dev; struct device_node *node = dev->of_node; struct of_phandle_args args; struct q6asm_dai_data *pdata; int rc; - pdata = kzalloc(sizeof(struct q6asm_dai_data), GFP_KERNEL); + pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL); if (!pdata) return -ENOMEM; @@ -582,36 +582,10 @@ static int q6asm_dai_bind(struct device *dev, struct device *master, void *data) dev_set_drvdata(dev, pdata); - return snd_soc_register_component(dev, &q6asm_fe_dai_component, + return devm_snd_soc_register_component(dev, &q6asm_fe_dai_component, q6asm_fe_dais, ARRAY_SIZE(q6asm_fe_dais)); } -static void q6asm_dai_unbind(struct device *dev, struct device *master, - void *data) -{ - struct q6asm_dai_data *pdata = dev_get_drvdata(dev); - - snd_soc_unregister_component(dev); - - kfree(pdata); - -} - -static const struct component_ops q6asm_dai_comp_ops = { - .bind = q6asm_dai_bind, - .unbind = q6asm_dai_unbind, -}; - -static int q6asm_dai_probe(struct platform_device *pdev) -{ - return component_add(&pdev->dev, &q6asm_dai_comp_ops); -} - -static int q6asm_dai_dev_remove(struct platform_device *pdev) -{ - component_del(&pdev->dev, &q6asm_dai_comp_ops); - return 0; -} static const struct of_device_id q6asm_dai_device_id[] = { { .compatible = "qcom,q6asm-dais" }, @@ -625,7 +599,6 @@ static struct platform_driver q6asm_dai_platform_driver = { .of_match_table = of_match_ptr(q6asm_dai_device_id), }, .probe = q6asm_dai_probe, - .remove = q6asm_dai_dev_remove, }; module_platform_driver(q6asm_dai_platform_driver);