From patchwork Fri Jul 13 15:36:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 10523601 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 08F1E6032C for ; Fri, 13 Jul 2018 15:39:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EAEE329BBC for ; Fri, 13 Jul 2018 15:39:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DEE8D29BC7; Fri, 13 Jul 2018 15:39:41 +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=-2.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,T_DKIM_INVALID autolearn=ham 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 3044229BDE for ; Fri, 13 Jul 2018 15:39:41 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id EA52926773A; Fri, 13 Jul 2018 17:39:28 +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 521F426772A; Fri, 13 Jul 2018 17:39:25 +0200 (CEST) Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by alsa0.perex.cz (Postfix) with ESMTP id A6A1A267727 for ; Fri, 13 Jul 2018 17:39:23 +0200 (CEST) Received: by mail-wm0-f67.google.com with SMTP id s13-v6so4816065wmc.1 for ; Fri, 13 Jul 2018 08:39:23 -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=OqHiQ49cJea9/GlixOkx9jZTRTO42wXjtFFZOu5frC0=; b=aSKiJVUbuxEvbXOGrAWXuWpfKaLJAG1kAao4f25dIoU2iJksAcSws4PXT+QL7b8PAI j0O8/dHDeSGQMRt+aItpumyYPw8wlayDV0glajjgO7Fnw8nUp4TWVnYnEljjCodDC4zw 7jzXN0EyOhBgzCwZcbO2baUUqWQYgVN5v3Xbg= 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=OqHiQ49cJea9/GlixOkx9jZTRTO42wXjtFFZOu5frC0=; b=Ta5OvXQHWhp4THQFfuozYDPIuQ9aYtHf06U/L9F0gP91VdX4Ovnmgz7Wgr8WcK3ghd EiepymBkg1TCBHGuYpR6w2fk29n3JFZDIHarL+O5EQ14po2cIm0EqGx4HZXrvM8BMGCG zsFAI0rEHO86lOgvyJpitmitLOT09B+IMWZIX0u98jQTkXxf4F33gSt+1GcGtP+AWQbs kCQjPvvSwiFae265+9P5/snMPooKJ2DMO3zvHvbiUVwlv3XaEWhUn4BH/FhRnAiJiRZ0 GpRyAHY3mtedH/m1RyirrFaS0Fe8fRl13+1y4tuATDdCRR/ceW+AAzT7SFCCy/qOnfOj OZ5g== X-Gm-Message-State: AOUpUlG1D1RKrz1FKsoBAvZwoSqBoRTISIhABeK5mbT1X5D4el8HEIaj PYCddNPe88yyRcKF8d4g0s3RyA== X-Google-Smtp-Source: AAOMgpf3H2k8f19rJNXIZm/z4Kw0WPwOPRg3IzxwiFWBpyQnEt4Qy8CJVcj+c+/I1Y/6DMZThIovrg== X-Received: by 2002:a1c:3e50:: with SMTP id l77-v6mr4037736wma.45.1531496363172; Fri, 13 Jul 2018 08:39:23 -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.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 Jul 2018 08:39:22 -0700 (PDT) From: Srinivas Kandagatla To: broonie@kernel.org, lgirdwood@gmail.com, alsa-devel@alsa-project.org Date: Fri, 13 Jul 2018 16:36:29 +0100 Message-Id: <20180713153632.32511-3-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> Cc: bgoswami@codeaurora.org, linux-kernel@vger.kernel.org, tiwai@suse.com, vkoul@kernel.org, rohitkr@codeaurora.org, Srinivas Kandagatla Subject: [alsa-devel] [PATCH v2 2/5] ASoC: qdsp6: q6afe-dai: remove component fw related code 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 X-Virus-Scanned: ClamAV using ClamSMTP 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/q6afe-dai.c | 34 ++++------------------------------ 1 file changed, 4 insertions(+), 30 deletions(-) diff --git a/sound/soc/qcom/qdsp6/q6afe-dai.c b/sound/soc/qcom/qdsp6/q6afe-dai.c index 24d1ffc3e5db..3081464befc7 100644 --- a/sound/soc/qcom/qdsp6/q6afe-dai.c +++ b/sound/soc/qcom/qdsp6/q6afe-dai.c @@ -4,7 +4,6 @@ #include #include -#include #include #include #include @@ -1405,11 +1404,12 @@ static void of_q6afe_parse_dai_data(struct device *dev, } } -static int q6afe_dai_bind(struct device *dev, struct device *master, void *data) +static int q6afe_dai_dev_probe(struct platform_device *pdev) { struct q6afe_dai_data *dai_data; + struct device *dev = &pdev->dev; - dai_data = kzalloc(sizeof(*dai_data), GFP_KERNEL); + dai_data = devm_kzalloc(dev, sizeof(*dai_data), GFP_KERNEL); if (!dai_data) return -ENOMEM; @@ -1417,35 +1417,10 @@ static int q6afe_dai_bind(struct device *dev, struct device *master, void *data) of_q6afe_parse_dai_data(dev, dai_data); - return snd_soc_register_component(dev, &q6afe_dai_component, + return devm_snd_soc_register_component(dev, &q6afe_dai_component, q6afe_dais, ARRAY_SIZE(q6afe_dais)); } -static void q6afe_dai_unbind(struct device *dev, struct device *master, - void *data) -{ - struct q6afe_dai_data *dai_data = dev_get_drvdata(dev); - - snd_soc_unregister_component(dev); - kfree(dai_data); -} - -static const struct component_ops q6afe_dai_comp_ops = { - .bind = q6afe_dai_bind, - .unbind = q6afe_dai_unbind, -}; - -static int q6afe_dai_dev_probe(struct platform_device *pdev) -{ - return component_add(&pdev->dev, &q6afe_dai_comp_ops); -} - -static int q6afe_dai_dev_remove(struct platform_device *pdev) -{ - component_del(&pdev->dev, &q6afe_dai_comp_ops); - return 0; -} - static const struct of_device_id q6afe_dai_device_id[] = { { .compatible = "qcom,q6afe-dais" }, {}, @@ -1458,7 +1433,6 @@ static struct platform_driver q6afe_dai_platform_driver = { .of_match_table = of_match_ptr(q6afe_dai_device_id), }, .probe = q6afe_dai_dev_probe, - .remove = q6afe_dai_dev_remove, }; module_platform_driver(q6afe_dai_platform_driver);