From patchwork Wed May 22 10:34:42 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: 164803 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp694996ili; Wed, 22 May 2019 03:36:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqyxAPixUDqCKb3cUrAaNrpWtqAcUQxAcLKCnXdSzpIeSRMVpv14LkzWp4I4dVBn02jH3SRL X-Received: by 2002:aa7:8f16:: with SMTP id x22mr23833497pfr.202.1558521418352; Wed, 22 May 2019 03:36:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558521418; cv=none; d=google.com; s=arc-20160816; b=fFHPo78froyZU2EVrAK+pOzMamTKH1o/PizubRFWpLjOf70DrOZKhNkGzq0N84lOsa Qy6TPaj5yqTkV7JONXBokQ5Q7u9ICMS7rzsQfwqskYWRTkU9iHbo7mZZkrACt8Urkmj6 P4j8D0mjOUIZ3rJoRQD8Zj/f2ZVdNuWcN/oNkXD7TP5DlDm1aIoZCSu2zzh6KOiUuzUH M8JUwtDXa+t6T0bj7th3buQd7buoSmU8rs8h4GOwn+qfTZ+AusNK85svDOw6dVLMPRv7 G45ZOjSogVO0uChO7r8/XN3lQPMtWRey2MngS+rYAS7P7S11N8CVjVxbtluG2xLkMm/b zTSA== 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=PBdjjAg6xV0K1NY/b/Sa1lSpV9VQB9JLr/WQe3JyIPVvGg4wedmQuJXSE4EzELPKCY 0tsAJKpuvZAsAb6teaPsFmhsevg28wAwLWwk0UEFlYZwoRn483yCp69I/Mf6Fq4VbhRv h2xRtFt+UXSEsYb/2QOvLe7OG7khwCLdt6GGFB9ASusyNqgi8K+WpHUpC7EFAY/NEERO odOvuNG7lf7juaHfGHYVmGQdoT5oSVlJ+9t2nq5dQVgWEOw2HnT+qzSdpk77G/I+z9KH seM039C303ll0xYBWGVQnm+BqudmdoMpD4d7lE84O4c2WHicT41JG2QA3u6HhtEx7D+/ 7kYQ== 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 g1si11419771pgq.350.2019.05.22.03.36.58; Wed, 22 May 2019 03:36:58 -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 S1729330AbfEVKfe (ORCPT + 30 others); Wed, 22 May 2019 06:35:34 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:47020 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729249AbfEVKfa (ORCPT ); Wed, 22 May 2019 06:35:30 -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 C8DA1341; Wed, 22 May 2019 03:35:29 -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 B96EA3F575; Wed, 22 May 2019 03:35:28 -0700 (PDT) From: Suzuki K Poulose To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, mathieu.poirier@linaro.org, coresight@lists.linaro.org, Suzuki K Poulose Subject: [PATCH v4 09/30] coresight: Use coresight device names for sinks in PMU attribute Date: Wed, 22 May 2019 11:34:42 +0100 Message-Id: <1558521304-27469-10-git-send-email-suzuki.poulose@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1558521304-27469-1-git-send-email-suzuki.poulose@arm.com> References: <1558521304-27469-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;