From patchwork Fri Nov 28 09:44:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 5402401 X-Patchwork-Delegate: eduardo.valentin@ti.com Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7BB3F9F47A for ; Fri, 28 Nov 2014 09:45:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A4FD620142 for ; Fri, 28 Nov 2014 09:45:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D93E520123 for ; Fri, 28 Nov 2014 09:45:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751727AbaK1JpM (ORCPT ); Fri, 28 Nov 2014 04:45:12 -0500 Received: from mail-pd0-f182.google.com ([209.85.192.182]:52637 "EHLO mail-pd0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751707AbaK1JpL (ORCPT ); Fri, 28 Nov 2014 04:45:11 -0500 Received: by mail-pd0-f182.google.com with SMTP id r10so6441151pdi.27 for ; Fri, 28 Nov 2014 01:45:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=Ho9JrUYw9JFCDhuk97aPfAQhbPluBEqd/odoj7BbQoA=; b=m8ggitFpUSIpPuiNsrqlyPhwKV7CRosMJ6rP32wk3HvBGts5mMJjq7HutVX6tqv5Ib TUuC6QalmpHObUXunlKqpi9hP5OGOBqylDZz7yp4Pr8mves7heZmlX2XVG+YDvBa1Mg+ VK8ZFJBfOyFrTPkflYa35RetnL4EeCv4aqwD11E2Njar2j8erq6eNImcvIzyyncQ/2qV aq8jv4LU9CY/wWFzuZJbgrORnPw1muPDLCdzsEXAxhLZ9LGqk+lmp41WJrDajEHllYct lTCvsRYmCINu4Xc0GhUxoSSiAE6UzWEr4SdHsGUlXilbGcT9065KIw1YQ+ovJpyBys8n NPog== X-Gm-Message-State: ALoCoQlpDligLuzaVWXz/NsiFYHqX7y7x2psdlhX+/Gpnq4+L1Ub3+BKHLROHiwLgmI8csI8xX/U X-Received: by 10.66.139.106 with SMTP id qx10mr72870015pab.138.1417167910540; Fri, 28 Nov 2014 01:45:10 -0800 (PST) Received: from localhost ([122.167.111.40]) by mx.google.com with ESMTPSA id yc4sm9446649pab.27.2014.11.28.01.45.09 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 28 Nov 2014 01:45:09 -0800 (PST) From: Viresh Kumar To: linux-pm@vger.kernel.org, edubezval@gmail.com Cc: linaro-kernel@lists.linaro.org, rui.zhang@intel.com, Viresh Kumar Subject: [PATCH 09/26] cpu_cooling: no need to set cpufreq_state to zero Date: Fri, 28 Nov 2014 15:14:03 +0530 Message-Id: <15ba799d1224df9e31165e6dfd8a8dc516232657.1417167599.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.0.3.693.g996b0fd In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, 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 Its already zero, we allocated cpufreq_dev with kzalloc. Signed-off-by: Viresh Kumar --- drivers/thermal/cpu_cooling.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c index 59725d8..cf9d1de 100644 --- a/drivers/thermal/cpu_cooling.c +++ b/drivers/thermal/cpu_cooling.c @@ -491,7 +491,7 @@ __cpufreq_cooling_register(struct device_node *np, return cool_dev; } cpufreq_dev->cool_dev = cool_dev; - cpufreq_dev->cpufreq_state = 0; + mutex_lock(&cooling_cpufreq_lock); /* Register the notifier for first cpufreq cooling device */