From patchwork Tue Aug 18 04:54:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: MyungJoo Ham X-Patchwork-Id: 7028151 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id AD418C05AC for ; Tue, 18 Aug 2015 04:54:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3E1A8205D1 for ; Tue, 18 Aug 2015 04:54:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B043020532 for ; Tue, 18 Aug 2015 04:54:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751062AbbHREyz (ORCPT ); Tue, 18 Aug 2015 00:54:55 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:35088 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750936AbbHREyy (ORCPT ); Tue, 18 Aug 2015 00:54:54 -0400 Received: from epcpsbgr2.samsung.com (u142.gpu120.samsung.co.kr [203.254.230.142]) by mailout2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NT902V2VHNFE920@mailout2.samsung.com> for linux-pm@vger.kernel.org; Tue, 18 Aug 2015 13:54:51 +0900 (KST) Received: from epcpsbgx2.samsung.com ( [172.20.52.115]) by epcpsbgr2.samsung.com (EPCPMTA) with SMTP id B9.0C.28411.B9AB2D55; Tue, 18 Aug 2015 13:54:51 +0900 (KST) X-AuditID: cbfee68e-f79c56d000006efb-3b-55d2ba9bd420 Received: from epmailer03 ( [203.254.219.143]) by epcpsbgx2.samsung.com (EPCPMTA) with SMTP id 8D.62.31182.B9AB2D55; Tue, 18 Aug 2015 13:54:51 +0900 (KST) Date: Tue, 18 Aug 2015 04:54:51 +0000 (GMT) From: MyungJoo Ham Subject: [PATCH] PM / devfreq: tegra: Update governor to use devfreq_update_stats() To: "linux-pm@vger.kernel.org" Cc: "javi.merino@arm.com" , tomeu.vizoso@collabora.com, linux-tegra@vger.kernel.org Reply-to: myungjoo.ham@samsung.com MIME-version: 1.0 X-MTR: 20150818045251867@myungjoo.ham Msgkey: 20150818045251867@myungjoo.ham X-EPLocale: ko_KR.utf-8 X-Priority: 3 X-EPWebmail-Msg-Type: personal X-EPWebmail-Reply-Demand: 0 X-EPApproval-Locale: X-EPHeader: ML X-MLAttribute: X-RootMTR: 20150818045251867@myungjoo.ham X-ParentMTR: X-ArchiveUser: X-CPGSPASS: N X-ConfirmMail: N,general Content-transfer-encoding: base64 Content-type: text/plain; charset=utf-8 MIME-version: 1.0 Message-id: <874354786.192611439873691246.JavaMail.weblogic@ep2mlwas01a> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrMIsWRmVeSWpSXmKPExsWyRsSkWHf2rkuhBgveiFl87j3C6MDo8XmT XABjFJdNSmpOZllqkb5dAlfGjd17GQtW8VSseraauYHxD3cXIyeHkIC6xKIlJ9lAbAkBE4kn ly8zQ9hiEhfurQeKcwHVLGWUmHK4jxmmaNrGJawQiTmMEm+mPWMBSbAIqEpsmXSFqYuRg4NN QE9i5udkkLCwQLDEjGXfGUFsEQFLiRt7roAtYxYok3hych0zxBFKEmv2vQIbwysgKHFy5hMW iF2qEgeP72KHiKtJTP5zihEiLi5xYe4ldgibV2JG+1OoejmJaV/XQN0pLXF+1gZGmGcWf38M FeeXOHZ7BxOELSAx9cxBqBotif3zd0DZfBJrFr5lganfdWo5M8yu+1vmQvVKSGxtecIK8Yui xJTuh+wgrzMLaEqs36WP7hVeAQ+JnhNLmUHBJiEwkUPiyuRDzBMYlWYhqZuFZNQshFHIShYw sqxiFE0tSC4oTkovMtIrTswtLs1L10vOz93ECE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km8 obGxiZmJqaWJhYGpuZI47/9zuSFCAumJJanZqakFqUUwfUwcnFINjMx24Xbe026qVMzjWMOf uLczuGUh98N1DcV8vKLKzbPVnXsWcn7xzHE+dnwuW5efeiTDzKn3fpdlqCsxcay/+z1RRXri lX3q/w6ruX0I2X7m5JJZPGeUfXzOHZa9dOTZbKNp5+ZeuLa57pfn1493rNM/2dSnGz7Xy1P8 4HXvUrrqDdMSv99JOUosxRmJhlrMRcWJAAn4j8lXAwAA DLP-Filter: Pass X-CFilter-Loop: Reflected Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, MIME_BASE64_BLANKS, RCVD_IN_DNSWL_HI, 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 Direct invocation of get_dev_status() is no more recommended. Signed-off-by: MyungJoo Ham --- drivers/devfreq/tegra-devfreq.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) -- 1.9.1 Reviewed-by: Javi Merino diff --git a/drivers/devfreq/tegra-devfreq.c b/drivers/devfreq/tegra-devfreq.c index 13a1a6e..848b93e 100644 --- a/drivers/devfreq/tegra-devfreq.c +++ b/drivers/devfreq/tegra-devfreq.c @@ -541,18 +541,20 @@ static struct devfreq_dev_profile tegra_devfreq_profile = { static int tegra_governor_get_target(struct devfreq *devfreq, unsigned long *freq) { - struct devfreq_dev_status stat; + struct devfreq_dev_status *stat; struct tegra_devfreq *tegra; struct tegra_devfreq_device *dev; unsigned long target_freq = 0; unsigned int i; int err; - err = devfreq->profile->get_dev_status(devfreq->dev.parent, &stat); + err = devfreq_update_stats(devfreq); if (err) return err; - tegra = stat.private_data; + stat = &devfreq->last_status; + + tegra = stat->private_data; for (i = 0; i < ARRAY_SIZE(tegra->devices); i++) { dev = &tegra->devices[i];