From patchwork Tue Jun 11 12:53:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kachhap X-Patchwork-Id: 2703741 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 152973FD4E for ; Tue, 11 Jun 2013 13:00:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752218Ab3FKMzJ (ORCPT ); Tue, 11 Jun 2013 08:55:09 -0400 Received: from mail-pa0-f46.google.com ([209.85.220.46]:33543 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751720Ab3FKMzF (ORCPT ); Tue, 11 Jun 2013 08:55:05 -0400 Received: by mail-pa0-f46.google.com with SMTP id fa11so5455908pad.33 for ; Tue, 11 Jun 2013 05:55:05 -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=Rcz9Hipuj+5tqLlfiJgaef/KqsJWUfGbsjS8EkPYd74=; b=lmGDiJHK73d1gNv+zTbgIpuRz38ZN5vUGNWgYQ2DHiBKaH4Tct7YNiw6BlquoRBIHp 04tKDNvvJ+qflzJIM3fz7NpgnRMTD4f0j3e2jDifM28KZbcNMPLNfXfVlyxFNVjldIxp jL6R6wbro7tT3NeToin8Lvo9xKBblUzX9vPRIEVyBIVOJNRgUho9LtWkq06WqUOjHpfT nCbUBIW234cLZ9zb3CgTE6Fc2xTYen06W5PCr7/LPHTm/FMjFozVcM1DN4qhjLGM350E cfqC11J5MkOq7iP8f74cYu5+8ERZ+8TGiCepmrLONvi15ICUjBZiALR4nWpWOTLP4D0m eUfg== X-Received: by 10.66.159.234 with SMTP id xf10mr18726617pab.203.1370955305416; Tue, 11 Jun 2013 05:55:05 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPSA id wi6sm14599807pbc.22.2013.06.11.05.55.01 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 11 Jun 2013 05:55:04 -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 V5 15/30] thermal: exynos: Return success even if no cooling data supplied Date: Tue, 11 Jun 2013 18:23:25 +0530 Message-Id: <1370955220-2949-16-git-send-email-amit.daniel@samsung.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1370955220-2949-1-git-send-email-amit.daniel@samsung.com> References: <1370955220-2949-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++)