From patchwork Tue Oct 9 05:54:14 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Len Brown X-Patchwork-Id: 1568161 Return-Path: X-Original-To: patchwork-linux-acpi@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 B4456DFFCF for ; Tue, 9 Oct 2012 06:03:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753192Ab2JIGDh (ORCPT ); Tue, 9 Oct 2012 02:03:37 -0400 Received: from mail-qc0-f174.google.com ([209.85.216.174]:38957 "EHLO mail-qc0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752443Ab2JIGDf (ORCPT ); Tue, 9 Oct 2012 02:03:35 -0400 Received: by mail-qc0-f174.google.com with SMTP id d3so3587711qch.19 for ; Mon, 08 Oct 2012 23:03:34 -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:in-reply-to:references:reply-to:organization; bh=RTKdUxb9urLnxyExoDJOnYw6v+1Ch6k6lswDB/q7hpM=; b=u9WePSOYZcNXiH08pHCDmPqwSu5RlHa6vAvpM6VhnXXgQD3cNx2XKSa0X/T09G6acN v88eSNo0QJurXrM7VNDURmLVFhEptRmpnERl1ZfwYhns4vs+AbYN1CbKZT43p+Q0XGL1 7vIcio62yDTDa4fBEAGoSV0Yn2P6CTyOZEqZM4oav7UB5AjJ3qeeeQlQ9NeOxcAg+Dp+ KcCahIRwooqXgfK0dRZiy+KoiJXHYJwPZN4NMwWi/QKkOTNmZzLSM0Yr9qF+T6RSyKBT 2Z/6T2Q3hdyE4pypmj948KjvQdlovoqRSz+MrA41q/tUR/SNy1/pIt8yHjgku3vf8IGF lyBQ== Received: by 10.224.52.139 with SMTP id i11mr33300254qag.11.1349762614873; Mon, 08 Oct 2012 23:03:34 -0700 (PDT) Received: from x980.localdomain6 (pool-74-104-146-186.bstnma.fios.verizon.net. [74.104.146.186]) by mx.google.com with ESMTPS id ck11sm20206037qab.17.2012.10.08.23.03.33 (version=SSLv3 cipher=OTHER); Mon, 08 Oct 2012 23:03:34 -0700 (PDT) From: Len Brown To: linux-acpi@vger.kernel.org, linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Jonghwa Lee Subject: [PATCH 24/30] Thermal: Fix bug on cpu_cooling, cooling device's id conflict problem. Date: Tue, 9 Oct 2012 01:54:14 -0400 Message-Id: X-Mailer: git-send-email 1.8.0.rc1 In-Reply-To: <1349762060-25334-1-git-send-email-lenb@kernel.org> References: <1349762060-25334-1-git-send-email-lenb@kernel.org> In-Reply-To: References: Reply-To: Len Brown Organization: Intel Open Source Technology Center Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org From: Jonghwa Lee This patch fixes small bug on cpu_cooling. CPU cooling device has own id generated with idr mathod. However in the previous version, it swapped to all same id at last stage of probing as 0. This makes id's collision and also occures error when it releases that id. Signed-off-by: Jonghwa Lee --- drivers/thermal/cpu_cooling.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c index 99a5d75..9050c1b 100644 --- a/drivers/thermal/cpu_cooling.c +++ b/drivers/thermal/cpu_cooling.c @@ -351,7 +351,7 @@ struct thermal_cooling_device *cpufreq_cooling_register( struct cpufreq_cooling_device *cpufreq_dev = NULL; unsigned int cpufreq_dev_count = 0, min = 0, max = 0; char dev_name[THERMAL_NAME_LENGTH]; - int ret = 0, id = 0, i; + int ret = 0, i; struct cpufreq_policy policy; list_for_each_entry(cpufreq_dev, &cooling_cpufreq_list, node) @@ -396,7 +396,6 @@ struct thermal_cooling_device *cpufreq_cooling_register( kfree(cpufreq_dev); return ERR_PTR(-EINVAL); } - cpufreq_dev->id = id; cpufreq_dev->cool_dev = cool_dev; cpufreq_dev->cpufreq_state = 0; mutex_lock(&cooling_cpufreq_lock);