Message ID | 1460701975-24178-3-git-send-email-cw00.choi@samsung.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6FFCD9F3A0 for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 15 Apr 2016 06:35:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 790C02037C for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 15 Apr 2016 06:35:25 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A97D42021A for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 15 Apr 2016 06:35:24 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aqxK8-0002c5-Ok; Fri, 15 Apr 2016 06:33:48 +0000 Received: from mailout2.samsung.com ([203.254.224.25]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aqxJs-0002QH-Jg for linux-arm-kernel@lists.infradead.org; Fri, 15 Apr 2016 06:33:34 +0000 Received: from epcpsbgr5.samsung.com (u145.gpu120.samsung.co.kr [203.254.230.145]) by mailout2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O5N02IUQWUY7A40@mailout2.samsung.com> for linux-arm-kernel@lists.infradead.org; Fri, 15 Apr 2016 15:32:58 +0900 (KST) Received: from epcpsbgm1new.samsung.com ( [172.20.52.113]) by epcpsbgr5.samsung.com (EPCPMTA) with SMTP id 6C.8E.04789.A1B80175; Fri, 15 Apr 2016 15:32:58 +0900 (KST) X-AuditID: cbfee691-f795a6d0000012b5-3d-57108b1a1970 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1new.samsung.com (EPCPMTA) with SMTP id 8A.93.06682.A1B80175; Fri, 15 Apr 2016 15:32:58 +0900 (KST) Received: from chan.10.32.193.11 ([10.113.62.212]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0O5N00MDZWUXF720@mmp2.samsung.com>; Fri, 15 Apr 2016 15:32:57 +0900 (KST) From: Chanwoo Choi <cw00.choi@samsung.com> To: myungjoo.ham@samsung.com, kyungmin.park@samsung.com, k.kozlowski@samsung.com, tomasz.figa@gmail.com, s.nawrocki@samsung.com, kgene@kernel.org Subject: [PATCH v2 2/8] PM / devfreq: event: Find the instance of devfreq-event device by using phandle Date: Fri, 15 Apr 2016 15:32:49 +0900 Message-id: <1460701975-24178-3-git-send-email-cw00.choi@samsung.com> X-Mailer: git-send-email 1.8.0 In-reply-to: <1460701975-24178-1-git-send-email-cw00.choi@samsung.com> References: <1460701975-24178-1-git-send-email-cw00.choi@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrPIsWRmVeSWpSXmKPExsWyRsSkUFeqWyDc4Ms8SYvrX56zWsw/co7V ov/NQlaLc69WMlpMuj+BxeL1C0OL/sevmS3ONr1ht9j0+BqrxeVdc9gsPvceYbSYcX4fk8W6 jbfYLW5f5rV4eeQHo8XS6xeZLG43rmCzmDB9LYvFmdOXWC1a9x5ht/i/Zwe7xeE37awWbas/ sFqs2vWH0UHCY828NYweLc09bB6X+3qZPG7dqffYOesuu8fK5V/YPDat6mTz2Lyk3uPfMXaP LVfbWTz6tqxi9Pi8SS6AJ4rLJiU1J7MstUjfLoErY9uvV+wFp7kq9p38xtjA+J2ji5GTQ0LA ROL13nksELaYxIV769m6GLk4hARWMEpMf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MItRouPoC7CEkMAX RolP+wRBbDYBLYn9L26AFYkITGWUONg9ixHEYRa4yiyxpLGNHaRKWCBTYu+HP6wgNouAqsT9 fX1sIDavgKvErn0nmCHWyUl82PMIrJ5TwE1i0eTrjBDbXCVa5s1jm8DIu4CRYRWjRGpBckFx UnquYV5quV5xYm5xaV66XnJ+7iZGcNJ4JrWD8eAu90OMAhyMSjy8D2IFwoVYE8uKK3MPMUpw MCuJ8E5uBQrxpiRWVqUW5ccXleakFh9iNAU6bCKzlGhyPjCh5ZXEGxqbmBlZGpkbWhgZmyuJ 8z7+vy5MSCA9sSQ1OzW1ILUIpo+Jg1OqgTH/Rq28gU01R4XfNuMt21PNi+/d19y7d1XwpgpO WW7DOTJiErq7Tyv7n1wdXSeV1dT1XjXysEn8zdRHDKG8s4r+djWr///xyIZ9qsMVjmNlK43V 8rpmX9IpvZh9IlesPcBOPl/4E+9sqf9fuKZGCl7bcqEg/yW3g+m5mAze9cxJEl928K5XUmIp zkg01GIuKk4EAN69jf0wAwAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160414_233332_916994_BA83A9A7 X-CRM114-Status: GOOD ( 11.24 ) X-Spam-Score: -7.9 (-------) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: mark.rutland@arm.com, linux-samsung-soc@vger.kernel.org, linux@arm.linux.org.uk, cw00.choi@samsung.com, pawel.moll@arm.com, ijc+devicetree@hellion.org.uk, linux.amoon@gmail.com, linux-pm@vger.kernel.org, rjw@rjwysocki.net, linux-kernel@vger.kernel.org, m.reichl@fivetechno.de, tjakobi@math.uni-bielefeld.de, devicetree@vger.kernel.org, robh+dt@kernel.org, galak@codeaurora.org, inki.dae@samsung.com, 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" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/devfreq/devfreq-event.c b/drivers/devfreq/devfreq-event.c index 38bf144ca147..39b048eda2ce 100644 --- a/drivers/devfreq/devfreq-event.c +++ b/drivers/devfreq/devfreq-event.c @@ -235,6 +235,11 @@ struct devfreq_event_dev *devfreq_event_get_edev_by_phandle(struct device *dev, mutex_lock(&devfreq_event_list_lock); list_for_each_entry(edev, &devfreq_event_list, node) { + if (edev->dev.parent && edev->dev.parent->of_node == node) + goto out; + } + + list_for_each_entry(edev, &devfreq_event_list, node) { if (!strcmp(edev->desc->name, node->name)) goto out; }
This patch use the phandle to find the instance of devfreq-event device in Device Tree when calling the devfreq_event_get_edev_by_phandle() because there is two type devfreq-event devices as following: First case, exynos-ppmu.c driver provides the maximum four event of each PPMU. So, when getting the instance of devfreq-event device, using the unique name of struct devfreq_event_desc. Second case, exynos-nocp.c driver provide the only one event of each NoC Probe device. So, when getting the instance of devfreq-event device, using the phandle of each NoC probe device. Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> --- drivers/devfreq/devfreq-event.c | 5 +++++ 1 file changed, 5 insertions(+)