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: 141911 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp951207ljj; Fri, 13 Jul 2018 08:39:40 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd+UZTLQdP+KiY2oWqDosFzlhqg2bqwwypNIIE9Ia3f84DCjosqqPFRYzDjI4mm7l+FWmVf X-Received: by 2002:a1c:dc1:: with SMTP id 184-v6mr4056073wmn.145.1531496380440; Fri, 13 Jul 2018 08:39:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531496380; cv=none; d=google.com; s=arc-20160816; b=cV0RiKz7n1zU8v4xId8WL/65jIIZaKj2ry+StEqktty2SH/m4fSg6KbUshjf52Jsvw nQMxIMC0cbxrzfjCR7OJ7OnOXcBlLW9+6evMVkv3jzH8guB+h4LbI6jwx8GSdWK7xugh 3miMERGtwYwSH3mXnYt7ht0MiXnK8GwtoOd2oKE6IVZnY1/xBZzGt0NGrBr6CEkEUXa5 dxMPyDGwhLRH78AqBkEpSHcpduxKlQ+QyTdX8DDmYlem/uLfP5cZOGzWA+bTA3cDkVmz kgSf4qQ/Q3H2/WA0yl1uhRegQ4EQHxJP0QNPKpCQSMsb9QWdmsvd7Tth8Y3zNMvhyPLB HbKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to:arc-authentication-results; bh=dwKGpb+Bw/i8gtqH1s6i6ZwHLiR3xCPIVpN/ysKtg8Q=; b=S85yWt3k8ISfG78sij7twDLpFuTtaYZvE0rlnUOF+fs2352g6knMr2tkvnuDUMiYbx 6oSTVMEuKlH19ROVy6rTpGON5QKgaMyoB88KU2PKMI1TaiuSgDWGYO4lcfzf0LYihPwY tuyjEZ/gyOWJW64AmB2NS2DHB5cTFr53Ie3x922t743JyXW6bENGlVRE33wX8WTqr+MY 3z+LHVLIZjSPzXsd4zJlpDjxapZ/KqAEA4h9L+djgKo2C0SkHpKz0oDl06C8zybx9Y82 mmq+oH23xynIv1tDxgpS1VOVdcbytnKNkg4IvY8s3JUvnVfi5btl8LyLPzde0UPscY4s Is/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=aSKiJVUb; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id l8-v6si7565426wrq.409.2018.07.13.08.39.40; Fri, 13 Jul 2018 08:39:40 -0700 (PDT) Received-SPF: pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) client-ip=77.48.224.243; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=aSKiJVUb; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS autolearn=disabled version=3.4.0 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-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 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(-) -- 2.16.2 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel 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);