From patchwork Tue May 7 10:52:36 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: 163512 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:81:0:0:0:0 with SMTP id l1csp1185770ilm; Tue, 7 May 2019 03:56:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqzZTYYNKLRsNQsEAja/uKSzbLn8rCJZw8FtP2KfkW/ylLO0msyPSnGuYvobhsOibNO3p8wR X-Received: by 2002:aa7:93a7:: with SMTP id x7mr40612654pff.196.1557226571897; Tue, 07 May 2019 03:56:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557226571; cv=none; d=google.com; s=arc-20160816; b=bmLfCPCUMua820P0+mLcrG/3Y9DitMlmkw05BhJn4bgwnjEdeoVLg4giT5LWJtibKX LivHGFtfzSFVaWyf0BVWtOL+z2zLDLQKCT3s6GDJYAC4BKXxvk2SGnVj3I7zqt+zSKXK ttuMgtki13yIzOWOjkRA3YlLa6X6fCdKcnD8Wxm+S8RUwDVL6IzVIpDM8hDZxil78Q58 iNQ8EK2Y9KmiHzkcFzIQlqXNvgf04UMxNI8M/qBd4Zv0BaDiFe8uF3x+sGfybcyoUmSP zn5tyzhQRnH77rJ1hgsaSQjvUmlDFX+exIm5oNgY883qrHYRV3tgtaj+gE/4gLLTuw9/ pEnA== 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=vtbv2fJ8ROMQwbwbEEFouiuHX0edAWvmI7nyCNyLFfc=; b=g+qRLb9S9tsShtkE8IYJXF89JFuzllFPYBAa2zLEquo2xdkuGR3lYOCwMq3JogTdhy V5g1d+Y0EDlM8+2wyUizDP/HMnFayyhmd26MVfWeY4TbPm16CiY+wqWni0aKfs1BRFtm ghE7988dY4hw6A1ZJ0oOwnwqOV7/xjVBMWlkmty8x3YBR4tymQhT6pnRA+yWaboPvAjj LUuN/KkfHV2iLYDse9i58nl1CaXjTZb/CHMb2LLy8gR1oM6NPcnuFGzwZ+D62+dRoTxe +4jqok84J9pfrlAxfhRG9H8hcdbvvrmhzKvwxPexVzgNcG2LujAtcNtTkHG4dL0WUT5p bFTQ== 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 k193si13471353pge.306.2019.05.07.03.56.11; Tue, 07 May 2019 03:56:11 -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 S1727403AbfEGK4K (ORCPT + 30 others); Tue, 7 May 2019 06:56:10 -0400 Received: from foss.arm.com ([217.140.101.70]:50140 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726969AbfEGKxy (ORCPT ); Tue, 7 May 2019 06:53:54 -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 E39141688; Tue, 7 May 2019 03:53:53 -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 B098B3F5AF; Tue, 7 May 2019 03:53:52 -0700 (PDT) From: Suzuki K Poulose To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, coresight@lists.linaro.org, rjw@rjwysocki.net, mathieu.poirier@linaro.org, Suzuki K Poulose Subject: [PATCH v3 09/30] coresight: Use coresight device names for sinks in PMU attribute Date: Tue, 7 May 2019 11:52:36 +0100 Message-Id: <1557226378-10131-10-git-send-email-suzuki.poulose@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1557226378-10131-1-git-send-email-suzuki.poulose@arm.com> References: <1557226378-10131-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 From: Mathieu Poirier Move to using the coresight device name instead of the parent device name for SINK attribute for PMU. Signed-off-by: Mathieu Poirier Signed-off-by: Suzuki K Poulose --- drivers/hwtracing/coresight/coresight-etm-perf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.7.4 diff --git a/drivers/hwtracing/coresight/coresight-etm-perf.c b/drivers/hwtracing/coresight/coresight-etm-perf.c index 3c62944..5c1ca0d 100644 --- a/drivers/hwtracing/coresight/coresight-etm-perf.c +++ b/drivers/hwtracing/coresight/coresight-etm-perf.c @@ -523,7 +523,7 @@ int etm_perf_add_symlink_sink(struct coresight_device *csdev) unsigned long hash; const char *name; struct device *pmu_dev = etm_pmu.dev; - struct device *pdev = csdev->dev.parent; + struct device *dev = &csdev->dev; struct dev_ext_attribute *ea; if (csdev->type != CORESIGHT_DEV_TYPE_SINK && @@ -536,15 +536,15 @@ int etm_perf_add_symlink_sink(struct coresight_device *csdev) if (!etm_perf_up) return -EPROBE_DEFER; - ea = devm_kzalloc(pdev, sizeof(*ea), GFP_KERNEL); + ea = devm_kzalloc(dev, sizeof(*ea), GFP_KERNEL); if (!ea) return -ENOMEM; - name = dev_name(pdev); + name = dev_name(dev); /* See function coresight_get_sink_by_id() to know where this is used */ hash = hashlen_hash(hashlen_string(NULL, name)); - ea->attr.attr.name = devm_kstrdup(pdev, name, GFP_KERNEL); + ea->attr.attr.name = devm_kstrdup(dev, name, GFP_KERNEL); if (!ea->attr.attr.name) return -ENOMEM;