Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759832AbcJZHhe (ORCPT ); Wed, 26 Oct 2016 03:37:34 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:44578 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754302AbcJZHf5 (ORCPT ); Wed, 26 Oct 2016 03:35:57 -0400 X-AuditID: cbfee61a-f79926d000005981-f4-58105cda11b9 From: Chanwoo Choi To: myungjoo.ham@samsung.com, kyungmin.park@samsung.com Cc: rjw@rjwysocki.net, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Chanwoo Choi Subject: [PATCH 1/2] PM / devfreq: rk3399_dmc: Use the resource-managed function to add devfreq dev Date: Wed, 26 Oct 2016 16:35:49 +0900 Message-id: <1477467350-27059-2-git-send-email-cw00.choi@samsung.com> X-Mailer: git-send-email 1.8.0 In-reply-to: <1477467350-27059-1-git-send-email-cw00.choi@samsung.com> References: <1477467350-27059-1-git-send-email-cw00.choi@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrNLMWRmVeSWpSXmKPExsVy+t9jQd1bMQIRBjtOcFhc//Kc1eJs0xt2 i8u75rBZfO49wmhxu3EFm8WZ05dYHdg8tlxtZ/Ho27KK0ePzJrkA5ig3m4zUxJTUIoXUvOT8 lMy8dFul0BA3XQslhbzE3FRbpQhd35AgJYWyxJxSIM/IAA04OAe4Byvp2yW4ZZy/71Jwib3i Uf8K9gbGJWxdjJwcEgImEvt2bmaHsMUkLtxbDxTn4hASmMUoca7/ESuE84NR4tu6FhaQKjYB LYn9L26AdYsImEvsWvoTzGYWKJWYvX41cxcjB4ewQKrEuWNaIGEWAVWJcyfOsoGEeQVcJZ7M Z4bYJSfxYc8jsL2cAm4SM/5PAZsiBFSy5OwPpgmMvAsYGVYxSqQWJBcUJ6XnGuallusVJ+YW l+al6yXn525iBAfsM6kdjAd3uR9iFOBgVOLhrTjKHyHEmlhWXJl7iFGCg1lJhPdDhECEEG9K YmVValF+fFFpTmrxIUZToLsmMkuJJucDoymvJN7QxNzE3NjAwtzS0sRISZy3cfazcCGB9MSS 1OzU1ILUIpg+Jg5OqQbGio2OB1mvFAdL6O+59E+zXNGpM/p3kHusyNFFXZtC1j3e8/3FpKjW LqOrB3pU/DxnT6sWF1S3fLns6NUcr3OMLGqBNcFzJtzt2rhs1nKTqSverNt6qDxB7nX09Mm+ STreiWob2pafCDnclJVuxvTk7Bw/r2iWiuhC0zqli0WMwvm3v869ovZYiaU4I9FQi7moOBEA mN2+DG4CAAA= 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