From patchwork Wed Mar 20 18:49:30 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: 160708 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp625828jan; Wed, 20 Mar 2019 11:50:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqzbtOAftFB8xbIY9xRF/Li1JTgoTePD4CwCf7E+T/+ho4aq6nfpcjwV3dmW0NH+GZ5Xz8bh X-Received: by 2002:a17:902:9a88:: with SMTP id w8mr9573215plp.8.1553107837079; Wed, 20 Mar 2019 11:50:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553107837; cv=none; d=google.com; s=arc-20160816; b=YvQwfH79OgUGLpbi2eYd5Jrg+yipel3EDsSsM0eY/ITNmBjxFigFlAOo0SzlGxTuIV L+Y+19zBjtItPZDi8+WWU4MQh0xapc1SpPZDUGb/htKUD8LKnJq/WQjvFuOe4Mh1NqAu 32xzAaY6U2W7R1KqjAF4+/8YK3VPjcBX/+lDFDG6mXquaeLaE3GqJ5GsWZu4/IUCaMww pf16yQFdwadM0eOdQ8bxmHMu6OIEop65aVzj15Y04CldlAbtAtz+HxEihZPOqyH8mw8o rtLBTKnUYp5H6RDNaJlSzk94kYQN6M68ITIxNXwIDOCop1v8bgpdODLkVwz18EjJlKRl cYvw== 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=p9idP47SCdDpv+b0+MksSMgmnvchtCTDHNla8PtqHmE=; b=LnvoVPNKLGYckLepPZKm0SF1dIZtoOBsvsghaxdYk0Ahj5R8jIsqg4sSPj5fg9xA27 4aZwI9N4ynjQd2UddpXOQ8z2nuIKZKfBU1DQWrZEhfpZVtB1QPoUg8DHO/rZeH4NyedW A5P5lNKKu+CIRji751dWmfijdKX+e0Cs5aL7ze5bTwns4tdg60XYnGra4BfDUhucv/RQ 6PlVgv+kE+vtw4tQSC1NmvR56ZSfWw0D9lvw03XJR7oclEgvRi2mQRwer2f5r2MunpaK PIGxmopun8p7DmWIFi2wLPD9W8/oVrA6F3+71wX2Ru43e5HU4RAkcDevIY2g9GVD2YZq rFCA== 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 n19si2193801pgk.158.2019.03.20.11.50.36; Wed, 20 Mar 2019 11:50:37 -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 S1727607AbfCTSuf (ORCPT + 31 others); Wed, 20 Mar 2019 14:50:35 -0400 Received: from foss.arm.com ([217.140.101.70]:44930 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727590AbfCTSuc (ORCPT ); Wed, 20 Mar 2019 14:50:32 -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 F004FA78; Wed, 20 Mar 2019 11:50:31 -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 769A03F59C; Wed, 20 Mar 2019 11:50:30 -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 13/25] coresight: etb10: Clean up device specific data Date: Wed, 20 Mar 2019 18:49:30 +0000 Message-Id: <1553107783-3340-14-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 Track the coresight device instead of the real device. Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose --- drivers/hwtracing/coresight/coresight-etb10.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.7.4 diff --git a/drivers/hwtracing/coresight/coresight-etb10.c b/drivers/hwtracing/coresight/coresight-etb10.c index 105782e..a471cbd 100644 --- a/drivers/hwtracing/coresight/coresight-etb10.c +++ b/drivers/hwtracing/coresight/coresight-etb10.c @@ -97,12 +97,12 @@ static unsigned int etb_get_buffer_depth(struct etb_drvdata *drvdata) { u32 depth = 0; - pm_runtime_get_sync(drvdata->dev); + pm_runtime_get_sync(drvdata->dev->parent); /* RO registers don't need locking */ depth = readl_relaxed(drvdata->base + ETB_RAM_DEPTH_REG); - pm_runtime_put(drvdata->dev); + pm_runtime_put(drvdata->dev->parent); return depth; } @@ -701,7 +701,6 @@ static int etb_probe(struct amba_device *adev, const struct amba_id *id) if (!drvdata) return -ENOMEM; - drvdata->dev = &adev->dev; drvdata->atclk = devm_clk_get(&adev->dev, "atclk"); /* optional */ if (!IS_ERR(drvdata->atclk)) { ret = clk_prepare_enable(drvdata->atclk); @@ -740,6 +739,7 @@ static int etb_probe(struct amba_device *adev, const struct amba_id *id) if (IS_ERR(drvdata->csdev)) return PTR_ERR(drvdata->csdev); + drvdata->dev = &drvdata->csdev->dev; drvdata->miscdev.name = pdata->name; drvdata->miscdev.minor = MISC_DYNAMIC_MINOR; drvdata->miscdev.fops = &etb_fops;