From patchwork Tue Nov 8 09:13:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanwoo Choi X-Patchwork-Id: 9416961 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 742EC60720 for ; Tue, 8 Nov 2016 09:14:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6655B287BA for ; Tue, 8 Nov 2016 09:14:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5B0DE28F3D; Tue, 8 Nov 2016 09:14:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3977F28F3B for ; Tue, 8 Nov 2016 09:14:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753582AbcKHJOH (ORCPT ); Tue, 8 Nov 2016 04:14:07 -0500 Received: from mailout2.samsung.com ([203.254.224.25]:43745 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932247AbcKHJNg (ORCPT ); Tue, 8 Nov 2016 04:13:36 -0500 Received: from epcpsbgm1new.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OGB002ZCGAJSLC0@mailout2.samsung.com>; Tue, 08 Nov 2016 18:13:31 +0900 (KST) X-AuditID: cbfee61a-f79916d0000062de-87-5821973bac73 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1new.samsung.com (EPCPMTA) with SMTP id 11.6B.25310.B3791285; Tue, 8 Nov 2016 18:13:31 +0900 (KST) Received: from localhost.localdomain ([10.113.62.212]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OGB00H01GAI9M00@mmp1.samsung.com>; Tue, 08 Nov 2016 18:13:31 +0900 (KST) From: Chanwoo Choi To: myungjoo.ham@samsung.com, kyungmin.park@samsung.com Cc: rjw@rjwysocki.net, subhashj@codeaurora.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Chanwoo Choi Subject: [PATCH v2 1/2] PM / devfreq: rk3399_dmc: Use the resource-managed function to add devfreq dev Date: Tue, 08 Nov 2016 18:13:27 +0900 Message-id: <1478596408-2958-2-git-send-email-cw00.choi@samsung.com> X-Mailer: git-send-email 1.8.0 In-reply-to: <1478596408-2958-1-git-send-email-cw00.choi@samsung.com> References: <1478596408-2958-1-git-send-email-cw00.choi@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrBLMWRmVeSWpSXmKPExsVy+t9jAV3r6YoRBk1XeC2uf3nOanG26Q27 xeVdc9gsPvceYbS43biCzeLM6UusFjcW72RzYPe43NfL5LHlajuLR9+WVYwenzfJBbBEudlk pCampBYppOYl56dk5qXbKoWGuOlaKCnkJeam2ipF6PqGBCkplCXmlAJ5RgZowME5wD1YSd8u wS3j/H2XgkvsFY/6V7A3MC5h62Lk5JAQMJFYN7GbCcIWk7hwbz1QnItDSGApo0Tnk0csEM4P RomLO3sYQarYBLQk9r+4AdYtImAusWvpT7AOZoE+RolLk5+zgiSEBTIkbjRdAStiEVCVuPan FWwFr4CLxLLmB4wQ6+QkPux5xA5icwq4Srz8sh2sRgiopmfPb/YJjLwLGBlWMUqkFiQXFCel 5xrmpZbrFSfmFpfmpesl5+duYgSH8jOpHYwHd7kfYhTgYFTi4e2QUYwQYk0sK67MPcQowcGs JMJ7cypQiDclsbIqtSg/vqg0J7X4EKMp0GETmaVEk/OBcZZXEm9oYm5ibmxgYW5paWKkJM7b OPtZuJBAemJJanZqakFqEUwfEwenVAMjn8Nx9ueR+colZYUC8dxNjcoPudqTZ13UnTFNNUv7 V0pGKsfC9yvl2M/sObbohLT6unWp+vtblT9uK321yWCr6NGCyN2mYoeTLXXipA/06PS91omf VFjFv+/kBKG+qcsns5g1Hc7m2nCumyVs3/13h0/vlZ704LydYdub3OPv/tmr1t1zSZVXYinO SDTUYi4qTgQAfqQ7/3sCAAA= X-MTR: 20000000000000000@CPGS Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch uses the resource-managed to add the devfreq device. This function will make it easy to handle the devfreq device. - struct devfreq *devm_devfreq_add_device(struct device *dev, struct devfreq_dev_profile *profile, const char *governor_name, void *data); Signed-off-by: Chanwoo Choi --- drivers/devfreq/rk3399_dmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/devfreq/rk3399_dmc.c b/drivers/devfreq/rk3399_dmc.c index e24b73d66659..3f8f4381cd4a 100644 --- a/drivers/devfreq/rk3399_dmc.c +++ b/drivers/devfreq/rk3399_dmc.c @@ -436,7 +436,7 @@ static int rk3399_dmcfreq_probe(struct platform_device *pdev) rk3399_devfreq_dmc_profile.initial_freq = data->rate; - data->devfreq = devfreq_add_device(dev, + data->devfreq = devm_devfreq_add_device(dev, &rk3399_devfreq_dmc_profile, "simple_ondemand", &data->ondemand_data);