[-mm patch] drivers/cpuidle/: make code static

From: Adrian Bunk
Date: Sun Mar 04 2007 - 20:48:37 EST


On Fri, Mar 02, 2007 at 03:00:26AM -0800, Andrew Morton wrote:
>...
> Changes since 2.6.20-mm2:
>...
> git-acpi.patch
>...
> git trees
>...

This patch makes the following needlessly global code static:
- driver.c: __cpuidle_find_driver()
- governor.c: __cpuidle_find_governor()
- ladder.c: struct ladder_governor

Signed-off-by: Adrian Bunk <bunk@xxxxxxxxx>

---

drivers/cpuidle/cpuidle.h | 2 --
drivers/cpuidle/driver.c | 2 +-
drivers/cpuidle/governor.c | 2 +-
drivers/cpuidle/governors/ladder.c | 2 +-
4 files changed, 3 insertions(+), 5 deletions(-)

--- linux-2.6.21-rc2-mm1/drivers/cpuidle/cpuidle.h.old 2007-03-04 20:42:29.000000000 +0100
+++ linux-2.6.21-rc2-mm1/drivers/cpuidle/cpuidle.h 2007-03-04 20:43:13.000000000 +0100
@@ -23,13 +23,11 @@
/* drivers */
extern int cpuidle_attach_driver(struct cpuidle_device *dev);
extern void cpuidle_detach_driver(struct cpuidle_device *dev);
-extern struct cpuidle_driver * __cpuidle_find_driver(const char *str);
extern int cpuidle_switch_driver(struct cpuidle_driver *drv);

/* governors */
extern int cpuidle_attach_governor(struct cpuidle_device *dev);
extern void cpuidle_detach_governor(struct cpuidle_device *dev);
-extern struct cpuidle_governor * __cpuidle_find_governor(const char *str);
extern int cpuidle_switch_governor(struct cpuidle_governor *gov);

/* sysfs */
--- linux-2.6.21-rc2-mm1/drivers/cpuidle/driver.c.old 2007-03-04 20:42:46.000000000 +0100
+++ linux-2.6.21-rc2-mm1/drivers/cpuidle/driver.c 2007-03-04 20:42:55.000000000 +0100
@@ -73,7 +73,7 @@
*
* Must be called with cpuidle_lock aquired.
*/
-struct cpuidle_driver * __cpuidle_find_driver(const char *str)
+static struct cpuidle_driver * __cpuidle_find_driver(const char *str)
{
struct cpuidle_driver *drv;

--- linux-2.6.21-rc2-mm1/drivers/cpuidle/governor.c.old 2007-03-04 20:43:22.000000000 +0100
+++ linux-2.6.21-rc2-mm1/drivers/cpuidle/governor.c 2007-03-04 20:43:29.000000000 +0100
@@ -72,7 +72,7 @@
*
* Must be called with cpuidle_lock aquired.
*/
-struct cpuidle_governor * __cpuidle_find_governor(const char *str)
+static struct cpuidle_governor * __cpuidle_find_governor(const char *str)
{
struct cpuidle_governor *gov;

--- linux-2.6.21-rc2-mm1/drivers/cpuidle/governors/ladder.c.old 2007-03-04 20:43:51.000000000 +0100
+++ linux-2.6.21-rc2-mm1/drivers/cpuidle/governors/ladder.c 2007-03-04 20:44:01.000000000 +0100
@@ -199,7 +199,7 @@
kfree(dev->governor_data);
}

-struct cpuidle_governor ladder_governor = {
+static struct cpuidle_governor ladder_governor = {
.name = "ladder",
.init = ladder_init_device,
.exit = ladder_exit_device,

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/