From patchwork Tue May 7 13:01:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kachhap X-Patchwork-Id: 2533181 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 A4F2CE00E6 for ; Tue, 7 May 2013 13:04:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932533Ab3EGNCj (ORCPT ); Tue, 7 May 2013 09:02:39 -0400 Received: from mail-pd0-f178.google.com ([209.85.192.178]:43395 "EHLO mail-pd0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932393Ab3EGNCi (ORCPT ); Tue, 7 May 2013 09:02:38 -0400 Received: by mail-pd0-f178.google.com with SMTP id w11so393651pde.9 for ; Tue, 07 May 2013 06:02:37 -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=kiAC3Bu4Rcm1terim7F+BmagZKdLhyFzh/aHeB6XCPU=; b=rLyj/XCQJCqb30TMh5vOKG3A6hQCYOFXIRaaem26dFZvCy6LVqsdXtSHQWIg5XeHQd g+NZGCoWiyldcvBNWgtKYW1wivCgrjG4MOIqJl2tSMfPkDN9Lb4+LhzCYhSgKeHwTlCn 8R86WfNjKV7Dzbojbps0LeH6aPBBW5+WCg3H0ngDZfMe+vR5XmMeCzhgr2sHJgguSi8i tyl6/f+6Bvph11OZKW061/tIxOF80sJm8aG7te1H9xm08TbT0I8c0fRZYjEhN38oTPd8 DahdGCDW+iVkdKTebCke3lnbSoUmTQuIscF0+9pF0X0YkVRtQC0U8jKfkHGw2f7n8vbj qFYQ== X-Received: by 10.66.220.197 with SMTP id py5mr2809647pac.86.1367931757451; Tue, 07 May 2013 06:02:37 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPSA id l4sm28220809pbo.6.2013.05.07.06.02.32 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 07 May 2013 06:02:36 -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 V3 13/21] thermal: exynos: Return success even if no cooling data supplied Date: Tue, 7 May 2013 18:31:03 +0530 Message-Id: <1367931671-3906-14-git-send-email-amit.daniel@samsung.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1367931671-3906-1-git-send-email-amit.daniel@samsung.com> References: <1367931671-3906-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 c0e4bdb..b7ca8a4 100644 --- a/drivers/thermal/samsung/exynos_thermal_common.c +++ b/drivers/thermal/samsung/exynos_thermal_common.c @@ -136,7 +136,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++) @@ -185,7 +185,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++)