From patchwork Thu Oct 25 11:46:17 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 12506 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 CB01323F6F for ; Thu, 25 Oct 2012 11:46:23 +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 75A92A18FA7 for ; Thu, 25 Oct 2012 11:46:23 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so1971329iej.11 for ; Thu, 25 Oct 2012 04:46:22 -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=+/7XZUrI9iJiB3Qg9IYXYYFLuiTzC9QegcukfH41+3g=; b=PQTfahorIvP8w+BZuM3OjsoRgm9vu55hnBI6ywbEQdgyXKJXDgIfgqPyh9msnMZT3q P/+OcdRUfIxZPpQ/VDgVfIqZ2UNirxml1RZlrWNypankR0sydT2nyFa5XSv6kt3vJ7M6 Jc6gTGGhimRA3Tg0prxtqEpnYLmErTqlhNTI5l+toY6cYKZ26umWgOngwcQHRbJ1Tesp zptJsd830VPhNARiGUWtSBHmctL7m8GgYOO+bRVifthL9guk2tPZWcDWfiFEZiJdiAi+ JIr5NpxY+UoKcmZUdd0Us19z8sS74Og1Q4zGm5gOaHKjjPwWsFFRj9TzXl9FVtI7Yhid tbiA== Received: by 10.50.91.195 with SMTP id cg3mr4035767igb.57.1351165582774; Thu, 25 Oct 2012 04:46:22 -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.67.148 with SMTP id n20csp30691igt; Thu, 25 Oct 2012 04:46:21 -0700 (PDT) Received: by 10.180.106.9 with SMTP id gq9mr13259271wib.12.1351165580412; Thu, 25 Oct 2012 04:46:20 -0700 (PDT) Received: from mail-we0-f178.google.com (mail-we0-f178.google.com [74.125.82.178]) by mx.google.com with ESMTPS id ct3si9243555wib.13.2012.10.25.04.46.20 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 25 Oct 2012 04:46:20 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.178 is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) client-ip=74.125.82.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.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 mail-we0-f178.google.com with SMTP id r6so997607wey.37 for ; Thu, 25 Oct 2012 04:46:20 -0700 (PDT) Received: by 10.180.106.9 with SMTP id gq9mr13259206wib.12.1351165579869; Thu, 25 Oct 2012 04:46:19 -0700 (PDT) Received: from localhost.localdomain (AToulouse-654-1-373-205.w86-199.abo.wanadoo.fr. [86.199.108.205]) by mx.google.com with ESMTPS id di7sm10799011wib.11.2012.10.25.04.46.18 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 25 Oct 2012 04:46:18 -0700 (PDT) From: Daniel Lezcano To: rjw@sisk.pl Cc: linaro-dev@lists.linaro.org, patches@linaro.org, linux-pm@vger.kernel.org Subject: [PATCH] cpuidle - sysfs : move declaration in the sysfs file Date: Thu, 25 Oct 2012 13:46:17 +0200 Message-Id: <1351165577-32020-1-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.5.4 X-Gm-Message-State: ALoCoQnxWy4OHLXZPAP9U/OW0G7cN51//JLQYCobYHDEgAxCZrY8BPLHZX4c+klfYyFL8nwhsvwN The structure cpuidle_state_kobj is not used anywhere except in the sysfs.c file. The definition of this structure is not needed in the cpuidle header file. This patch moves it to the sysfs.c file in order to encapsulate the code a bit more. Signed-off-by: Daniel Lezcano --- drivers/cpuidle/sysfs.c | 7 +++++++ include/linux/cpuidle.h | 7 ------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/cpuidle/sysfs.c b/drivers/cpuidle/sysfs.c index ed87399..f15c1e5 100644 --- a/drivers/cpuidle/sysfs.c +++ b/drivers/cpuidle/sysfs.c @@ -297,6 +297,13 @@ static struct attribute *cpuidle_state_default_attrs[] = { NULL }; +struct cpuidle_state_kobj { + struct cpuidle_state *state; + struct cpuidle_state_usage *state_usage; + struct completion kobj_unregister; + struct kobject kobj; +}; + #define kobj_to_state_obj(k) container_of(k, struct cpuidle_state_kobj, kobj) #define kobj_to_state(k) (kobj_to_state_obj(k)->state) #define kobj_to_state_usage(k) (kobj_to_state_obj(k)->state_usage) diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h index 279b1ea..7daf0e3 100644 --- a/include/linux/cpuidle.h +++ b/include/linux/cpuidle.h @@ -82,13 +82,6 @@ cpuidle_set_statedata(struct cpuidle_state_usage *st_usage, void *data) st_usage->driver_data = data; } -struct cpuidle_state_kobj { - struct cpuidle_state *state; - struct cpuidle_state_usage *state_usage; - struct completion kobj_unregister; - struct kobject kobj; -}; - struct cpuidle_device { unsigned int registered:1; unsigned int enabled:1;