From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C4350C31E5B for ; Wed, 19 Jun 2019 17:32:17 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8D87B2084A for ; Wed, 19 Jun 2019 17:32:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ry4EtQPn"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Mnb5DfKw" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8D87B2084A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=JhAIHCKrVwKM4w+kXIcBVGW4S9qkgnkT9fsppXed1V4=; b=ry4EtQPnzmJmgHV89NyGq8Gx80 UrdUj0UiDMgwPmUgrditfv4X7gguJx84CsZwPzmxp3sUhIqhZQxaIt/O3nSPC7QLXXSbHCRpixMVV coHlABWvoxOJIqxWTkMa/NpJDfci3ZbdWzLisCeAiAJMUqN2CdVI6NNMvwfaXI0mt+kuotnxvyrrT a9dy+C/ao3XJymRKZWkiI4bVcL3T+VzavRvH4I1MXC2EwbZ/A8eBjH8W99n4ATjLpcAXym+VBf5Hv SVvFoAO8NpG30UV/xY0wgPzyP9B1IqTDB97O25JPIsBii4FnHPR5ftgkgw2WJAaXI0gVuQqVvyYDM FccBBXIw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hdeRQ-0001SX-7e; Wed, 19 Jun 2019 17:32:12 +0000 Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hdePF-00074w-Lp for linux-arm-kernel@lists.infradead.org; Wed, 19 Jun 2019 17:29:59 +0000 Received: by mail-pl1-x643.google.com with SMTP id t7so80567plr.11 for ; Wed, 19 Jun 2019 10:29:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=AgYewqbl8iSJQRrA3NRCvtvG59aXYoMecD7NpQO4c4M=; b=Mnb5DfKw9t5I4GT8GQd8zyP2p/jZpeYyEMsPLL++qR3PoJptYomk0tePj3MaEPXFn2 rPi+pDsoqORrp4Vyj5vI8uWkABh62YmGcQ9wBn9Bs//B3cmsajbvTa5rcsUBwuUm3ulv vV91hUiOwYla/M2Gmgpu9dIE7whTWQ6u9nKyxglpvySyosD1L4UO8+wNqnezcSuVPtnZ UrjfLYohn+60nlZiEx/ugixfPs00nlROTk93eBZcrPbUk/9peDQl2m4sQpGjyPPmHlkd WC83E//J1zVfd2aSEFXGSqs1RKHnIS+5m1ec0JHHJBZLBA+BNyusneibeCbqysCpohGn rlag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=AgYewqbl8iSJQRrA3NRCvtvG59aXYoMecD7NpQO4c4M=; b=AWJ4LrfvAdsqtcNm+6i+5O24r2Sy1Xx8uQAKCQcroIFUEmVgwqPsgEMgYy/Sz1Ehzv xJZ3VuROT4kf6jvQQT+r2TZLvidNJ2Pa2GlQlkkLOFeyGvth5esi7r6NU/Bu+q4xP2ZG NCkpQzxM5ozr3xCjQ8zwJar+8HZaA5s6d/KiWIN6yHwI2l4cJO2ISdIwj9VM2j1QWFXC OBqbp47grW89F7Aj0DaEZIqof2cGfX8xT8sqFdMBNTU7byXk1HGBQLeLuxjeo60q1BKe 2KMPzzG6S6wrcTfEDxHerCDFTUoVH5LHHg3v3/3oRsd9T78nt7B6suEg3QS5gDsS7e7S VIgA== X-Gm-Message-State: APjAAAUyXEvuhK9fBZa8DdzexxfFAKO9I+gQMdAUuPV/ydHHoSWAMgxG 7UvcKAAtKffX9rZjXmjMvXW4NgMuqIuOdA== X-Google-Smtp-Source: APXvYqx6VKCXT6TVD/0dK/+sgOUkYHjS5u79v5XhW/RfgZPyDElf185Pf4OdVcLUpon7X/gzI5HV4A== X-Received: by 2002:a17:902:7687:: with SMTP id m7mr38585711pll.310.1560965396915; Wed, 19 Jun 2019 10:29:56 -0700 (PDT) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id g2sm31348406pfb.95.2019.06.19.10.29.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Jun 2019 10:29:56 -0700 (PDT) From: Mathieu Poirier To: gregkh@linuxfoundation.org Subject: [PATCH 06/45] coresight: funnel: Clean up device book keeping Date: Wed, 19 Jun 2019 11:29:10 -0600 Message-Id: <20190619172949.4522-7-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190619172949.4522-1-mathieu.poirier@linaro.org> References: <20190619172949.4522-1-mathieu.poirier@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190619_102957_720928_1435E53A X-CRM114-Status: GOOD ( 14.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Suzuki K Poulose In preparation to use a consistent device naming scheme, clean up the device link tracking in funnel 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. Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier --- drivers/hwtracing/coresight/coresight-funnel.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/hwtracing/coresight/coresight-funnel.c b/drivers/hwtracing/coresight/coresight-funnel.c index 16b0c0e1e43a..6236a847bb0b 100644 --- a/drivers/hwtracing/coresight/coresight-funnel.c +++ b/drivers/hwtracing/coresight/coresight-funnel.c @@ -32,14 +32,12 @@ /** * struct funnel_drvdata - specifics associated to a funnel component * @base: memory mapped base address for this component. - * @dev: the device entity associated to this component. * @atclk: optional clock for the core parts of the funnel. * @csdev: component vitals needed by the framework. * @priority: port selection order. */ struct funnel_drvdata { void __iomem *base; - struct device *dev; struct clk *atclk; struct coresight_device *csdev; unsigned long priority; @@ -80,7 +78,7 @@ static int funnel_enable(struct coresight_device *csdev, int inport, rc = dynamic_funnel_enable_hw(drvdata, inport); if (!rc) - dev_dbg(drvdata->dev, "FUNNEL inport %d enabled\n", inport); + dev_dbg(&csdev->dev, "FUNNEL inport %d enabled\n", inport); return rc; } @@ -110,7 +108,7 @@ static void funnel_disable(struct coresight_device *csdev, int inport, if (drvdata->base) dynamic_funnel_disable_hw(drvdata, inport); - dev_dbg(drvdata->dev, "FUNNEL inport %d disabled\n", inport); + dev_dbg(&csdev->dev, "FUNNEL inport %d disabled\n", inport); } static const struct coresight_ops_link funnel_link_ops = { @@ -165,11 +163,11 @@ static ssize_t funnel_ctrl_show(struct device *dev, u32 val; struct funnel_drvdata *drvdata = dev_get_drvdata(dev->parent); - pm_runtime_get_sync(drvdata->dev); + pm_runtime_get_sync(dev->parent); val = get_funnel_ctrl_hw(drvdata); - pm_runtime_put(drvdata->dev); + pm_runtime_put(dev->parent); return sprintf(buf, "%#x\n", val); } @@ -205,7 +203,6 @@ static int funnel_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); -- 2.17.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel