Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753689AbcKHJOH (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 X-AuditID: cbfee61a-f79916d0000062de-87-5821973bac73 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-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 948 Lines: 28 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); -- 1.9.1