From patchwork Fri Jul 13 15:36:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 141909 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp951030ljj; Fri, 13 Jul 2018 08:39:31 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd9C+gBMY2L9ax8lzEJC5TofJYNpX+RzCKgGhES5GLmOM2uHD1caqYrwNpdDI6uFIAwZgiA X-Received: by 2002:a63:8648:: with SMTP id x69-v6mr6580837pgd.172.1531496371161; Fri, 13 Jul 2018 08:39:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531496371; cv=none; d=google.com; s=arc-20160816; b=CBnXVMUgQlo742nXh8gv0A368Ocf69QceV5M8mAAKDGuPrUIOYfKsplpvp9QrYllnd ot3hvn6qVU0LI2c01z6GI/1l6MTCsGjbjASb71oSHPjaoH3HOnp8lutU8YYVZ7cmuwM0 nQXBzDNIoWpxkKsma3zUxXXnaMtde/zRHFO9MPUBodN9DGddfpLosyZlZD18IDssSGZD CgE/NKsgClCkRdMxbkKXB7g1TeLYZCFFFADpRqODUwUouW+pTM2F0Ogh61jWld+/3uvx EPGlOu+jx8dK7UNyPW6p0Q7bZrqAlopdKncPG0/fzG85dmXd3DGpdQ8K5mi7X7UfdGif Dx9A== 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=7DT8uzieULApLhHCk+Za0usRqnEVnd2LGlbLtpiw7yc=; b=Mmm3pE8T90DDY1pLZIX+ixG4txwsrSsLlm6rCRIaOTDymmiUKLeUTj5xaH9ZoZiUV+ FN5dswm95tFwjJF+GUc9ltciE3qGIhUC8ktBfskCYp4aRHX99DLY5LfcEIBJe8yr+Sd2 aOxAM4w52PxhezB/Dqu2oMmqgyw7CxNWck2+WbGwUk2PA8YpY7NGd97GgdLtCrs4FskJ 0NuY+mXrSi0BFO2LwCjrY3qI5Lr6JnyAr9sC8E+QLt+6hFykNPubJovPykitE6azATTu JdwLH6KtT6mwOe4iPmiiI7J5oKo96Q8A2XfxYI3HQ2yBg7jjCXJzLDa75QmYIf44ODj9 0EmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="iVpbE/Tg"; 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 b9-v6si26152294plk.111.2018.07.13.08.39.30; Fri, 13 Jul 2018 08:39:31 -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="iVpbE/Tg"; 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 S1731935AbeGMPyg (ORCPT + 31 others); Fri, 13 Jul 2018 11:54:36 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:38096 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731552AbeGMPyf (ORCPT ); Fri, 13 Jul 2018 11:54:35 -0400 Received: by mail-wr1-f65.google.com with SMTP id m1-v6so12824168wrg.5 for ; Fri, 13 Jul 2018 08:39:26 -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=7DT8uzieULApLhHCk+Za0usRqnEVnd2LGlbLtpiw7yc=; b=iVpbE/TgrkJoRyeje16gkO+sU9aqmenWuGH0919eKPGHaoEscwsU3SFcuMyQ/PJC5T Y6nZNTirGAj9nN9BoGSpVEaCPHHHHXkyYfdS1UuqIvck1NZn2ovGYGVRxOVFg6gVjJVS euxd++oPh2aAjkh0z50H55mwCI89bKvtMhTcc= 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=7DT8uzieULApLhHCk+Za0usRqnEVnd2LGlbLtpiw7yc=; b=PHNpib2EhUlRtzwu2dJgjR3DuP+P3RWQjWKEmow8i22hx7853je3IAggOGAwnXb5uS pIMdIhQTrhgBFpA8jHZJJTcQZcNm0TgkisbZpajkf/a4CnqMLKB1gmORJ3LwdPOsdqfY 5n2mBH1sPXziYuIfmNcuuE8etsz11wKQEwvvJbLQaSuAQXj6A+hkCcAr6dGg7S2hc3qD iIlKf5BVEVrPh5UtkRghKnoBFRlEPupSRY4/Tuav8FDryc8RJEUR9gP3RSVBf7/Pihrk wOh9RY91g1HXA6eIHeCuDh3+ltaJ0ZK9K5m1b5xIQoXj0qgsZWxjIjICW0Gix2iNy8X9 Ci1g== X-Gm-Message-State: AOUpUlFSXuDue07ttmliLRJ9QPAKn5NXnc+v6T7Y6q1mr2xGArNYjXZb WoKJ1uYEUwTv4zPs9ZEI0Pwlhg== X-Received: by 2002:adf:959a:: with SMTP id p26-v6mr5142953wrp.202.1531496365156; Fri, 13 Jul 2018 08:39:25 -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.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 Jul 2018 08:39:24 -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 4/5] ASoC: qdsp6: q6routing: remove component framework related code Date: Fri, 13 Jul 2018 16:36:31 +0100 Message-Id: <20180713153632.32511-5-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/q6routing.c | 32 ++++++-------------------------- 1 file changed, 6 insertions(+), 26 deletions(-) -- 2.16.2 diff --git a/sound/soc/qcom/qdsp6/q6routing.c b/sound/soc/qcom/qdsp6/q6routing.c index 35269b492761..1d33b00e5b44 100644 --- a/sound/soc/qcom/qdsp6/q6routing.c +++ b/sound/soc/qcom/qdsp6/q6routing.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include @@ -977,9 +976,10 @@ static const struct snd_soc_component_driver msm_soc_routing_component = { .num_dapm_routes = ARRAY_SIZE(intercon), }; -static int q6routing_dai_bind(struct device *dev, struct device *master, - void *data) +static int q6pcm_routing_probe(struct platform_device *pdev) { + struct device *dev = &pdev->dev; + routing_data = kzalloc(sizeof(*routing_data), GFP_KERNEL); if (!routing_data) return -ENOMEM; @@ -989,35 +989,15 @@ static int q6routing_dai_bind(struct device *dev, struct device *master, mutex_init(&routing_data->lock); dev_set_drvdata(dev, routing_data); - return snd_soc_register_component(dev, &msm_soc_routing_component, + return devm_snd_soc_register_component(dev, &msm_soc_routing_component, NULL, 0); } -static void q6routing_dai_unbind(struct device *dev, struct device *master, - void *d) +static int q6pcm_routing_remove(struct platform_device *pdev) { - struct msm_routing_data *data = dev_get_drvdata(dev); - - snd_soc_unregister_component(dev); - - kfree(data); - + kfree(routing_data); routing_data = NULL; -} -static const struct component_ops q6routing_dai_comp_ops = { - .bind = q6routing_dai_bind, - .unbind = q6routing_dai_unbind, -}; - -static int q6pcm_routing_probe(struct platform_device *pdev) -{ - return component_add(&pdev->dev, &q6routing_dai_comp_ops); -} - -static int q6pcm_routing_remove(struct platform_device *pdev) -{ - component_del(&pdev->dev, &q6routing_dai_comp_ops); return 0; }