From patchwork Wed Sep 19 17:22:47 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 11508 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 8237C1B4E05 for ; Wed, 19 Sep 2012 17:22:56 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id D4DB0A1BBBB for ; Wed, 19 Sep 2012 17:22:55 +0000 (UTC) Received: by ieje10 with SMTP id e10so1431863iej.11 for ; Wed, 19 Sep 2012 10:22:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:x-gm-message-state; bh=2/2v0qV8sL5ErzsheHEao7Abmq7Jl1Tr0FMYNX3wNVQ=; b=alWhLRkj0VulndE4hxBgQj82mMioKk+9AHl42zonjeBMz4YNnCNFZkBohaI8LX4HTi /B0egoqV4CSg5mQWyv5+8bCN9hIxtfuU4S4oja0reC+MO+ZDsxSfJoWTicS4+EtKXN77 Sta+NC4w3LFVz5HWGIQCR2ndM7vHnlleMeSI6WH5WQpXakQKannq43CAEJego3FflYty 5vHuvLXQ7vaT+Fv4s6j9uPeH1VSrGXM+Mtih2ssrxv+ussjOSy9qH7M5h3sc9yBnvRKp 0KJ1mvnTKGq5uTnXVgBBf8uB1h4lniMiLpiYJEj3RhAF+mo7g4vK+W82DnaHOBo/vn/x RzYg== Received: by 10.50.217.227 with SMTP id pb3mr3725394igc.28.1348075375186; Wed, 19 Sep 2012 10:22:55 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.184.232 with SMTP id ex8csp34733igc; Wed, 19 Sep 2012 10:22:54 -0700 (PDT) Received: by 10.180.84.1 with SMTP id u1mr8003289wiy.15.1348075373623; Wed, 19 Sep 2012 10:22:53 -0700 (PDT) Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) by mx.google.com with ESMTPS id k44si4244444wep.96.2012.09.19.10.22.52 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 19 Sep 2012 10:22:53 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.178 is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) client-ip=209.85.212.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.178 is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) smtp.mail=daniel.lezcano@linaro.org Received: by wibhr14 with SMTP id hr14so1157696wib.13 for ; Wed, 19 Sep 2012 10:22:52 -0700 (PDT) Received: by 10.216.134.40 with SMTP id r40mr2184093wei.88.1348075372671; Wed, 19 Sep 2012 10:22:52 -0700 (PDT) Received: from localhost.localdomain (AToulouse-651-1-259-252.w109-214.abo.wanadoo.fr. [109.214.174.252]) by mx.google.com with ESMTPS id r9sm5977769wia.2.2012.09.19.10.22.50 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 19 Sep 2012 10:22:51 -0700 (PDT) From: Daniel Lezcano To: rjw@sisk.pl, lenb@kernel.org Cc: linux-pm@vger.kernel.org, linux-acpi@vger.kernel.org, patches@linaro.org, linaro-dev@lists.linaro.org Subject: [PATCH 1/3] cpuidle : remove unused ref count function Date: Wed, 19 Sep 2012 19:22:47 +0200 Message-Id: <1348075369-16451-1-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.5.4 X-Gm-Message-State: ALoCoQlknCj3jImkILF5++mMGXgVf76nNKhAYCaHaIpoSlIXd/LskmHIY0adgBJDfsppuch6varj These two functions are never used. Signed-off-by: Daniel Lezcano --- drivers/cpuidle/driver.c | 29 +---------------------------- include/linux/cpuidle.h | 4 ---- 2 files changed, 1 insertions(+), 32 deletions(-) diff --git a/drivers/cpuidle/driver.c b/drivers/cpuidle/driver.c index 58bf3b1..40cd3f3 100644 --- a/drivers/cpuidle/driver.c +++ b/drivers/cpuidle/driver.c @@ -16,7 +16,6 @@ static struct cpuidle_driver *cpuidle_curr_driver; DEFINE_SPINLOCK(cpuidle_driver_lock); -int cpuidle_driver_refcount; static void __cpuidle_register_driver(struct cpuidle_driver *drv) { @@ -90,34 +89,8 @@ void cpuidle_unregister_driver(struct cpuidle_driver *drv) } spin_lock(&cpuidle_driver_lock); - - if (!WARN_ON(cpuidle_driver_refcount > 0)) - cpuidle_curr_driver = NULL; - + cpuidle_curr_driver = NULL; spin_unlock(&cpuidle_driver_lock); } EXPORT_SYMBOL_GPL(cpuidle_unregister_driver); - -struct cpuidle_driver *cpuidle_driver_ref(void) -{ - struct cpuidle_driver *drv; - - spin_lock(&cpuidle_driver_lock); - - drv = cpuidle_curr_driver; - cpuidle_driver_refcount++; - - spin_unlock(&cpuidle_driver_lock); - return drv; -} - -void cpuidle_driver_unref(void) -{ - spin_lock(&cpuidle_driver_lock); - - if (!WARN_ON(cpuidle_driver_refcount <= 0)) - cpuidle_driver_refcount--; - - spin_unlock(&cpuidle_driver_lock); -} diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h index 279b1ea..5abf62b 100644 --- a/include/linux/cpuidle.h +++ b/include/linux/cpuidle.h @@ -145,8 +145,6 @@ extern void disable_cpuidle(void); extern int cpuidle_idle_call(void); extern int cpuidle_register_driver(struct cpuidle_driver *drv); extern struct cpuidle_driver *cpuidle_get_driver(void); -extern struct cpuidle_driver *cpuidle_driver_ref(void); -extern void cpuidle_driver_unref(void); extern void cpuidle_unregister_driver(struct cpuidle_driver *drv); extern int cpuidle_register_device(struct cpuidle_device *dev); extern void cpuidle_unregister_device(struct cpuidle_device *dev); @@ -169,8 +167,6 @@ static inline int cpuidle_idle_call(void) { return -ENODEV; } static inline int cpuidle_register_driver(struct cpuidle_driver *drv) {return -ENODEV; } static inline struct cpuidle_driver *cpuidle_get_driver(void) {return NULL; } -static inline struct cpuidle_driver *cpuidle_driver_ref(void) {return NULL; } -static inline void cpuidle_driver_unref(void) {} static inline void cpuidle_unregister_driver(struct cpuidle_driver *drv) { } static inline int cpuidle_register_device(struct cpuidle_device *dev) {return -ENODEV; }