From patchwork Mon Apr 15 16:03:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suzuki K Poulose X-Patchwork-Id: 162236 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp3108645jan; Mon, 15 Apr 2019 09:08:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqyB5JsZhJzWDJuCqqyAjG1YykzbMaI8aEtZt+Szpqn7lErVoZafJQiWSs5hrTcy/yFziJsl X-Received: by 2002:a62:6444:: with SMTP id y65mr76089566pfb.56.1555344527858; Mon, 15 Apr 2019 09:08:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555344527; cv=none; d=google.com; s=arc-20160816; b=dQaI75mHoq8uOaqqNfA8uvGNENkDt7BAYYHMSIWemlQKnYTLv9iQVIv9LcVbIVvnsF MPdItF6PZN1wnXnyvdpmgSseJMwV++P0E8vlYgconQn79wGWaqjKHI4cs8oCMWW8t7TA YHPyvCZNdv6fynci9Sh09QogZjWSBLvRYFBxTRjDD/790l+485VVRrNhgtayifyNnkWw +lnwu6nPfz43w5gYBM4awL0J2H5HXuba6OEp+xrOfdd+EIEVGWzsGf7QE4Xe3JpKXaW9 aM7INHgD8JY81bTDKknlkYivbsCyuOuuh5NTYCPKfzzoTwVifuPUJsBiyFbzPTf7J8fu FwDQ== 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; bh=IK699P3/WL6ouWxwIiLNGBD8n0pFyiTCXn8SQYF9fcY=; b=uOX+oMKzHVfuc/1CvYyBcWJfrOo7CyPWN0zi0utW+fY7RA3V5cx3h1R+nXrJWCrJCr l/JDbZzwxXTGaAlbSzTk8uQHTSQvLqSpBK2hyYD9hYY4/Y5sbaurv1BG0AYNFfUPKzSj 473zXmVnDdYeXxYpKz2PFWYGHmxgUyq38Y2HCVH7zRWmgsgidUo8oe+7YkxSz15B//LI z82xkEkbO9goJtPQ5Jy8+L+OyntcBbnfJly1WRXGbJHFS3h1Py3zdQlBTxHitP0NEaIo 4oFN/ASuhoGeRpsNoAE3r7WpIz/C2Dk0kvb/0Ks9R4prkbRPVwsXxkfyNqlCk2yD82qO yKwA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v10si47036438pgj.576.2019.04.15.09.08.47; Mon, 15 Apr 2019 09:08:47 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727903AbfDOQGC (ORCPT + 30 others); Mon, 15 Apr 2019 12:06:02 -0400 Received: from foss.arm.com ([217.140.101.70]:37730 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727876AbfDOQF5 (ORCPT ); Mon, 15 Apr 2019 12:05:57 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 02A8480D; Mon, 15 Apr 2019 09:05:57 -0700 (PDT) Received: from en101.cambridge.arm.com (en101.cambridge.arm.com [10.1.196.93]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 7B0933F68F; Mon, 15 Apr 2019 09:05:55 -0700 (PDT) From: Suzuki K Poulose To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, coresight@lists.linaro.org, mathieu.poirier@linaro.org, mike.leach@linaro.org, rjw@rjwysocki.net, robert.walker@arm.com, Suzuki K Poulose Subject: [PATCH v2 07/36] coresight: replicator: Cleanup device tracking Date: Mon, 15 Apr 2019 17:03:50 +0100 Message-Id: <1555344260-12375-8-git-send-email-suzuki.poulose@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1555344260-12375-1-git-send-email-suzuki.poulose@arm.com> References: <1555344260-12375-1-git-send-email-suzuki.poulose@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In preparation to use a consistent device naming scheme, clean up the device link tracking in replicator driver. Use the "coresight" device instead of the "real" parent device for all internal purposes. All other requests (e.g, power management, DMA operations) must use the "real" device which is the parent device. Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose --- drivers/hwtracing/coresight/coresight-replicator.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) -- 2.7.4 Reviewed-by: Mathieu Poirier diff --git a/drivers/hwtracing/coresight/coresight-replicator.c b/drivers/hwtracing/coresight/coresight-replicator.c index 4e0da85..8bbb008 100644 --- a/drivers/hwtracing/coresight/coresight-replicator.c +++ b/drivers/hwtracing/coresight/coresight-replicator.c @@ -26,13 +26,11 @@ * struct replicator_drvdata - specifics associated to a replicator component * @base: memory mapped base address for this component. Also indicates * whether this one is programmable or not. - * @dev: the device entity associated with this component * @atclk: optional clock for the core parts of the replicator. * @csdev: component vitals needed by the framework */ struct replicator_drvdata { void __iomem *base; - struct device *dev; struct clk *atclk; struct coresight_device *csdev; }; @@ -100,7 +98,7 @@ static int replicator_enable(struct coresight_device *csdev, int inport, if (drvdata->base) rc = dynamic_replicator_enable(drvdata, inport, outport); if (!rc) - dev_dbg(drvdata->dev, "REPLICATOR enabled\n"); + dev_dbg(&csdev->dev, "REPLICATOR enabled\n"); return rc; } @@ -139,7 +137,7 @@ static void replicator_disable(struct coresight_device *csdev, int inport, if (drvdata->base) dynamic_replicator_disable(drvdata, inport, outport); - dev_dbg(drvdata->dev, "REPLICATOR disabled\n"); + dev_dbg(&csdev->dev, "REPLICATOR disabled\n"); } static const struct coresight_ops_link replicator_link_ops = { @@ -193,7 +191,6 @@ static int replicator_probe(struct device *dev, struct resource *res) if (!drvdata) return -ENOMEM; - drvdata->dev = dev; drvdata->atclk = devm_clk_get(dev, "atclk"); /* optional */ if (!IS_ERR(drvdata->atclk)) { ret = clk_prepare_enable(drvdata->atclk);