From patchwork Mon Jun 17 06:46:24 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kachhap X-Patchwork-Id: 2731291 X-Patchwork-Delegate: eduardo.valentin@ti.com Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A87469F39E for ; Mon, 17 Jun 2013 06:52:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D7067201FC for ; Mon, 17 Jun 2013 06:52:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 42B84201FA for ; Mon, 17 Jun 2013 06:52:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932385Ab3FQGsP (ORCPT ); Mon, 17 Jun 2013 02:48:15 -0400 Received: from mail-pa0-f50.google.com ([209.85.220.50]:35280 "EHLO mail-pa0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932359Ab3FQGsM (ORCPT ); Mon, 17 Jun 2013 02:48:12 -0400 Received: by mail-pa0-f50.google.com with SMTP id fb1so2549205pad.37 for ; Sun, 16 Jun 2013 23:48:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=w6Gwc/eV+4CzY6jz1R/aMqJck0Hnr5aS3O+WZ+P3z84=; b=iP3etBXXWcwUkYJ0XW21yvvpMZBzeFqPrG/VaAtsLiDdhyWUq9do8Duce93bQsMz1/ pvpHIhPE2sh7i39z7VmDQwsaF3r3iA7Ic+KIDIZFb9kq64XyFKXcyGsgzZcJX0DVQ1BX L5ZCwrxhHB/19BQ+/c0zhm/bDLpTg5bYsGoaCg9tE9DXU8/kLEVHZ+1/Uj6Dsph93/ES mcC+kj2bxpPSVgvmPGIN940FqRpoNvQTc9liGvnHNmJVtF9WfKSAF8MmHNFauQtwk4/T LH+/xs1miTjEfb7PBmrY5zFp8avgd1yNpo/J7LgNWBSrfGL3zD4wFmmTFoo994AptDWt //WQ== X-Received: by 10.66.88.105 with SMTP id bf9mr11648113pab.175.1371451691669; Sun, 16 Jun 2013 23:48:11 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPSA id xl3sm11639859pbb.17.2013.06.16.23.48.07 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 16 Jun 2013 23:48:10 -0700 (PDT) From: Amit Daniel Kachhap To: linux-pm@vger.kernel.org, Zhang Rui , Eduardo Valentin Cc: linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, amit.kachhap@gmail.com, Kukjin Kim , jonghwa3.lee@samsung.com Subject: [PATCH V6 15/30] thermal: exynos: Return success even if no cooling data supplied Date: Mon, 17 Jun 2013 12:16:24 +0530 Message-Id: <1371451599-31035-16-git-send-email-amit.daniel@samsung.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1371451599-31035-1-git-send-email-amit.daniel@samsung.com> References: <1371451599-31035-1-git-send-email-amit.daniel@samsung.com> 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.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,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 This patch removes the error return in the bind/unbind routine as the platform may not register any cpufreq cooling data. Acked-by: Kukjin Kim Acked-by: Jonghwa Lee Signed-off-by: Amit Daniel Kachhap Acked-by: Eduardo Valentin --- drivers/thermal/samsung/exynos_thermal_common.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/thermal/samsung/exynos_thermal_common.c b/drivers/thermal/samsung/exynos_thermal_common.c index 7064eb7..86d39aa 100644 --- a/drivers/thermal/samsung/exynos_thermal_common.c +++ b/drivers/thermal/samsung/exynos_thermal_common.c @@ -131,7 +131,7 @@ static int exynos_bind(struct thermal_zone_device *thermal, tab_size = data->cooling_data.freq_clip_count; if (tab_ptr == NULL || tab_size == 0) - return -EINVAL; + return 0; /* find the cooling device registered*/ for (i = 0; i < th_zone->cool_dev_size; i++) @@ -180,7 +180,7 @@ static int exynos_unbind(struct thermal_zone_device *thermal, tab_size = data->cooling_data.freq_clip_count; if (tab_size == 0) - return -EINVAL; + return 0; /* find the cooling device registered*/ for (i = 0; i < th_zone->cool_dev_size; i++)