From patchwork Tue May 14 09:58:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kachhap X-Patchwork-Id: 2564411 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 9D752DF24C for ; Tue, 14 May 2013 10:05:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932177Ab3ENKE6 (ORCPT ); Tue, 14 May 2013 06:04:58 -0400 Received: from mail-pb0-f54.google.com ([209.85.160.54]:58702 "EHLO mail-pb0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932137Ab3ENKAe (ORCPT ); Tue, 14 May 2013 06:00:34 -0400 Received: by mail-pb0-f54.google.com with SMTP id ro8so289375pbb.13 for ; Tue, 14 May 2013 03:00:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=Rcz9Hipuj+5tqLlfiJgaef/KqsJWUfGbsjS8EkPYd74=; b=xmzLR9LSMpVo1LnkXoUFgH9eHdY+stElncqZ/g46NLC1SI5i1KNOcjl5UomBoUMaWd k8gc2NvEI7rDembynwgwY+w4P1dbC7q5rotCbG0rDBbqyqEW+lZdrAQV3cDltxqB/aTi RUw/ep1RSED0hBA+N/Ux76Zpal9OMpHhxSjKDUM7wOaD+uFp6zpuVMSRqdrtFijPuD6E I0ffIXxbhR1wi5PiMXU7OBBGOr2f71tgQCIytLpCqzrFTckoBl4ikjsSyskf/9xhfR9q T/ODnv1DPZmsnE/FyJk8OEceVAlkM9Qog027L8SnrrO95wJO0PVY1OiTLXBtWU6rD/w8 PgtQ== X-Received: by 10.68.253.230 with SMTP id ad6mr32421653pbd.182.1368525633155; Tue, 14 May 2013 03:00:33 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPSA id kv2sm17617396pbc.28.2013.05.14.03.00.29 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 14 May 2013 03:00:32 -0700 (PDT) From: Amit Daniel Kachhap To: linux-pm@vger.kernel.org Cc: Zhang Rui , linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, amit.kachhap@gmail.com, Kukjin Kim , Eduardo Valentin Subject: [PATCH V4 15/30] thermal: exynos: Return success even if no cooling data supplied Date: Tue, 14 May 2013 15:28:45 +0530 Message-Id: <1368525540-15034-16-git-send-email-amit.daniel@samsung.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1368525540-15034-1-git-send-email-amit.daniel@samsung.com> References: <1368525540-15034-1-git-send-email-amit.daniel@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org 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 Signed-off-by: Amit Daniel Kachhap --- 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++)