From patchwork Tue Nov 25 10:34:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 41458 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7EFEF25E18 for ; Tue, 25 Nov 2014 10:36:08 +0000 (UTC) Received: by mail-la0-f72.google.com with SMTP id gq15sf216392lab.11 for ; Tue, 25 Nov 2014 02:36:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:in-reply-to:references :sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=5NrobjgyiiKmkP5hvRaz1WNB2VIV0Cm/V4HRch86vf0=; b=gxX0nV3OPnuGUlTetTDm+n2C5kTwEiKNu+TA1lb+m2OIOziELZ2j5CBNHicCb869eE zDNbwjKurgYXDeHUxzO6wZxfBXI0kSJBAEsP/cnACzHZn/3ARuI5KjzIaKeBvOw3OVRT slqltEuWd6JQvhVfxjZzR1e56wLQMuwvtuU1e5v1CQ8okxQlE4sR1PmzwNDnu4KO2QC+ qVOXBPsYUw0jKzzknO3aT5yNMca/cNCbQcZg//U7R3kzUCZgLJ1TL8AQfC24AE4UfJ4i 2pg5fQ1s7hxoTNSsNrlEZhNiXjffgBVJhjyU9GoSAuOcTAX9CwKgTyQbukqM5LdUkg3S 4iOA== X-Gm-Message-State: ALoCoQl97czliHZkf+gemwfMY1lgu5PtSHo07O8BNzOCdGsSnm8Tn/zCgqeSB49WObVHQYys8jTW X-Received: by 10.112.143.136 with SMTP id se8mr186981lbb.18.1416911767400; Tue, 25 Nov 2014 02:36:07 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.153.6.12 with SMTP id cq12ls542587lad.42.gmail; Tue, 25 Nov 2014 02:36:07 -0800 (PST) X-Received: by 10.152.120.133 with SMTP id lc5mr25510869lab.62.1416911766994; Tue, 25 Nov 2014 02:36:06 -0800 (PST) Received: from mail-lb0-f179.google.com (mail-lb0-f179.google.com. [209.85.217.179]) by mx.google.com with ESMTPS id ls2si842375lac.124.2014.11.25.02.36.06 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 25 Nov 2014 02:36:06 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.179 as permitted sender) client-ip=209.85.217.179; Received: by mail-lb0-f179.google.com with SMTP id z11so260669lbi.10 for ; Tue, 25 Nov 2014 02:36:06 -0800 (PST) X-Received: by 10.152.87.100 with SMTP id w4mr24876058laz.27.1416911766569; Tue, 25 Nov 2014 02:36:06 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp410773lbc; Tue, 25 Nov 2014 02:36:05 -0800 (PST) X-Received: by 10.70.43.176 with SMTP id x16mr41847134pdl.31.1416911764968; Tue, 25 Nov 2014 02:36:04 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id mk8si1367241pdb.23.2014.11.25.02.36.04 for ; Tue, 25 Nov 2014 02:36:04 -0800 (PST) Received-SPF: none (google.com: linux-pm-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752478AbaKYKgD (ORCPT + 12 others); Tue, 25 Nov 2014 05:36:03 -0500 Received: from mail-pd0-f170.google.com ([209.85.192.170]:63876 "EHLO mail-pd0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752414AbaKYKgC (ORCPT ); Tue, 25 Nov 2014 05:36:02 -0500 Received: by mail-pd0-f170.google.com with SMTP id fp1so321738pdb.29 for ; Tue, 25 Nov 2014 02:36:01 -0800 (PST) X-Received: by 10.68.190.229 with SMTP id gt5mr40978008pbc.119.1416911761767; Tue, 25 Nov 2014 02:36:01 -0800 (PST) Received: from localhost ([122.167.111.40]) by mx.google.com with ESMTPSA id df1sm1141568pbb.2.2014.11.25.02.35.55 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 25 Nov 2014 02:36:01 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, stefan.wahren@i2se.com, nm@ti.com, linux-arm-kernel@lists.infradead.org, sudeep.holla@arm.com, Viresh Kumar Subject: [PATCH 7/8] exynos5440: free OPP table created during ->init() Date: Tue, 25 Nov 2014 16:04:22 +0530 Message-Id: <9b6cc4ddc2010abcac88c3995ce9ee29869cc195.1416910766.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.0.3.693.g996b0fd In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.179 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , OPP layer now supports freeing of OPPs and we should free them once they aren't useful anymore. Signed-off-by: Viresh Kumar --- drivers/cpufreq/exynos5440-cpufreq.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/cpufreq/exynos5440-cpufreq.c b/drivers/cpufreq/exynos5440-cpufreq.c index f33f25b..27a57ed 100644 --- a/drivers/cpufreq/exynos5440-cpufreq.c +++ b/drivers/cpufreq/exynos5440-cpufreq.c @@ -371,7 +371,7 @@ static int exynos_cpufreq_probe(struct platform_device *pdev) if (ret) { dev_err(dvfs_info->dev, "failed to init cpufreq table: %d\n", ret); - goto err_put_node; + goto err_free_opp; } dvfs_info->freq_count = dev_pm_opp_get_opp_count(dvfs_info->dev); exynos_sort_descend_freq_table(); @@ -423,6 +423,8 @@ static int exynos_cpufreq_probe(struct platform_device *pdev) err_free_table: dev_pm_opp_free_cpufreq_table(dvfs_info->dev, &dvfs_info->freq_table); +err_free_opp: + of_free_opp_table(dvfs_info->dev); err_put_node: of_node_put(np); dev_err(&pdev->dev, "%s: failed initialization\n", __func__); @@ -433,6 +435,7 @@ static int exynos_cpufreq_remove(struct platform_device *pdev) { cpufreq_unregister_driver(&exynos_driver); dev_pm_opp_free_cpufreq_table(dvfs_info->dev, &dvfs_info->freq_table); + of_free_opp_table(dvfs_info->dev); return 0; }