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: 1643461 Return-Path: X-Original-To: patchwork-linux-pm@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 36321DF2AB for ; Thu, 25 Oct 2012 11:46:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755025Ab2JYLqV (ORCPT ); Thu, 25 Oct 2012 07:46:21 -0400 Received: from mail-wg0-f44.google.com ([74.125.82.44]:35418 "EHLO mail-wg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754563Ab2JYLqV (ORCPT ); Thu, 25 Oct 2012 07:46:21 -0400 Received: by mail-wg0-f44.google.com with SMTP id dr13so1266419wgb.1 for ; Thu, 25 Oct 2012 04:46:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:x-gm-message-state; bh=+/7XZUrI9iJiB3Qg9IYXYYFLuiTzC9QegcukfH41+3g=; b=GnDfZ04lZv647nQ7D7X83K7w66DqE4cTMurl39MMRWSdA3zhodfLpvHmFJ8yD4BUVF jupMRWtI4rGnectWPw8wTNMhxTKl6RlAdZ/tdU8ap5G408G5S4qiSZMucgA4CXM4DOHk F/HEqcHynYODRuKz9TTDxeuLZ+oIRh83LSYt+W8uLFQVfquXfB6j2g8Ad4S/fnFj6mfc frISa9P2Qdx2Dik4K7F2cltvvqTq6iwYNZ/g8lnArY6ZAcPiWNSitrz4SkBTAemgW4bT ovUlpIzyGSjPZJf0be7KGct5pGrzeQnBwCivHkIjjiOGi9YE4V7nciPgCzcc/j6VSPwK oI9w== 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: ALoCoQkIZ9y0BAdEIjzYfC2xecwCdxqkqj6Deqb3uQmUS2rtMqgn5PRTLLoAPos/NXEhcOM+9QLL Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org 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;