From patchwork Mon Jun 24 10:50:36 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kachhap X-Patchwork-Id: 2770341 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2E4ABC0AB1 for ; Mon, 24 Jun 2013 10:57:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4DFF0201D2 for ; Mon, 24 Jun 2013 10:57:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2CB43201D7 for ; Mon, 24 Jun 2013 10:57:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753145Ab3FXKwQ (ORCPT ); Mon, 24 Jun 2013 06:52:16 -0400 Received: from mail-pb0-f51.google.com ([209.85.160.51]:34661 "EHLO mail-pb0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753094Ab3FXKwM (ORCPT ); Mon, 24 Jun 2013 06:52:12 -0400 Received: by mail-pb0-f51.google.com with SMTP id um15so10690105pbc.24 for ; Mon, 24 Jun 2013 03:52:12 -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=5dodYvYc3ZOjOnCAprzR2SloSX9x2T7MT9Kb5yNgrNQ=; b=AOgqHEEzDhirssqSEMOOccdkPzt9zzZZp7MNF2typQRs1FfIT/w31qzMZa/dviZp2u khL6EvtvBQWyzA5g9NOBooGz7J7mwFMADzyYw4+R/XdoGBS2qxg3aLFeL4+b9+d5qKyw dNQb0/0VsB7EKgC7/918LISkge7I77zK4PrtacsJlvAfH06xu/iNduyE2TGwZVltnY1d lGNcuDUULZATM3rGKFuFeg35+kLeBhtwRZ7PX0UfzcTLW4TMnKGxFxrcG7RMp3B41naa 9GosBWnBYiFemKqe8e3oWFT11qqTzGMdETqga9SDUEvdFDLNIiIevFnq++tkZB2QzTNv Jojw== X-Received: by 10.68.113.194 with SMTP id ja2mr22709486pbb.65.1372071132249; Mon, 24 Jun 2013 03:52:12 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPSA id tq8sm17631973pbc.30.2013.06.24.03.52.08 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 24 Jun 2013 03:52:11 -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 Subject: [PATCH V7 15/30] thermal: exynos: Return success even if no cooling data supplied Date: Mon, 24 Jun 2013 16:20:36 +0530 Message-Id: <1372071051-3167-16-git-send-email-amit.daniel@samsung.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1372071051-3167-1-git-send-email-amit.daniel@samsung.com> References: <1372071051-3167-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 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=ham 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 Acked-by: Eduardo Valentin 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 c6eab8c..99318e5 100644 --- a/drivers/thermal/samsung/exynos_thermal_common.c +++ b/drivers/thermal/samsung/exynos_thermal_common.c @@ -132,7 +132,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++) @@ -181,7 +181,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++)