From patchwork Wed Mar 20 18:49:24 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: 160725 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp627302jan; Wed, 20 Mar 2019 11:52:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqzv7w+t95RrbyPA1/i/d93WYfH1s8Gz81Lqp+d5UsGdnmA3hg2R8u76Lwo2Hn9ompoKUtRv X-Received: by 2002:aa7:914f:: with SMTP id 15mr9121080pfi.49.1553107940288; Wed, 20 Mar 2019 11:52:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553107940; cv=none; d=google.com; s=arc-20160816; b=yPK5AFsomd4o3gxJYhROwdWXNxI5S6nCZ2Y0LV8GXFYnXfm81J8b6d4fNZyz0W1Vu/ tPi3bGZmNmwCPnTC7WQn00q8O5vpnVqUsZD0dcg5fXPG9KzqrOejreGFACGelsMuVAYW tod6WlJ+hiagn2SKQMwvy6ojw0NTo0RhWNv13P7N9vc+FRG5T4VNCd32f47N1yBAWP1x YL5h5zhOB86129/KRQKq8eMc3/3KoWh20ri7YLD63iM/Dy1kyC9tm4Tx46Wv2H45RmHX r0SVl+1E6gcrAUudxACIlHYZWrFkmYad37k3MZFrxLh5jGT0IYcbFwZGVA9Iy7xAyW0t iDTg== 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=k3RpgrwJRXhrNdZWKbBI1nhiGZGFoJ6Dp6Z21SKkY9Q=; b=ZgJCbozUbVvbTUla1ScQqtUmFmFF3NZRxiSSQNbvHDKsiq3ZSjfkaZSBB7yb8Qu3rL AM/tTsFSFS1DGBh+kE3utkSDHTAzadZKCWQ6rtaAxtvuuNHO+5IcyccSKZepud0Q4YPE CHGYOsmVvBeMRIvWitOCp/bzf1t9CqVxeX7Y+uEhegWq2kB4R7CrClGwPI03V6BqUnkT Qz3v4A0+/V7sfJt3qO2yzWYHbUNCScLUuh99lIRIpktHZWRc2KCJHLRJKaNAfGqvDIOl XSUfMEc1gUjM5VYPAco/883mkO45OUqm1N4+4BF9vLJ3FZ6e3+nGf4/xg4bT50yFivNV JmPA== 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 r23si2176585pgv.406.2019.03.20.11.52.20; Wed, 20 Mar 2019 11:52:20 -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 S1727833AbfCTSwT (ORCPT + 31 others); Wed, 20 Mar 2019 14:52:19 -0400 Received: from foss.arm.com ([217.140.101.70]:44864 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727543AbfCTSuV (ORCPT ); Wed, 20 Mar 2019 14:50:21 -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 79671174E; Wed, 20 Mar 2019 11:50:21 -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 F3F153F59C; Wed, 20 Mar 2019 11:50:19 -0700 (PDT) From: Suzuki K Poulose To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, coresight@lists.linaro.org, mike.leach@linaro.org, robert.walker@arm.com, Suzuki K Poulose , Mathieu Poirier Subject: [PATCH 07/25] coresight: replicator: Cleanup device tracking Date: Wed, 20 Mar 2019 18:49:24 +0000 Message-Id: <1553107783-3340-8-git-send-email-suzuki.poulose@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1553107783-3340-1-git-send-email-suzuki.poulose@arm.com> References: <1553107783-3340-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 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);