[-mm patch] kernel/power/main.c: make code static

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 28, 2007 at 03:43:21AM -0700, Andrew Morton wrote:
>...
> Changes since 2.6.22-rc4-mm2:
>...
> +pm-reduce-code-duplication-between-mainc-and-userc.patch
>...
>  PM updates
>...


Some code can now become static.

Signed-off-by: Adrian Bunk <[email protected]>

---

 include/linux/pm.h   |    1 -
 kernel/power/main.c  |    4 ++--
 kernel/power/power.h |    1 -
 3 files changed, 2 insertions(+), 4 deletions(-)

--- linux-2.6.22-rc6-mm1/kernel/power/power.h.old	2007-07-01 00:21:34.000000000 +0200
+++ linux-2.6.22-rc6-mm1/kernel/power/power.h	2007-07-01 00:21:41.000000000 +0200
@@ -177,7 +177,6 @@
 				unsigned int, char *);
 
 /* kernel/power/main.c */
-extern int suspend_enter(suspend_state_t state);
 extern int suspend_devices_and_enter(suspend_state_t state);
 extern struct blocking_notifier_head pm_chain_head;
 
--- linux-2.6.22-rc6-mm1/include/linux/pm.h.old	2007-07-01 00:22:53.000000000 +0200
+++ linux-2.6.22-rc6-mm1/include/linux/pm.h	2007-07-01 00:23:04.000000000 +0200
@@ -138,7 +138,6 @@
  * @pm_ops: The new power management operations to set.
  */
 extern void pm_set_ops(struct pm_ops *pm_ops);
-extern struct pm_ops *pm_ops;
 extern int pm_suspend(suspend_state_t state);
 
 extern int pm_valid_only_mem(suspend_state_t state);
--- linux-2.6.22-rc6-mm1/kernel/power/main.c.old	2007-07-01 00:21:49.000000000 +0200
+++ linux-2.6.22-rc6-mm1/kernel/power/main.c	2007-07-01 00:23:11.000000000 +0200
@@ -31,7 +31,7 @@
 
 DEFINE_MUTEX(pm_mutex);
 
-struct pm_ops *pm_ops;
+static struct pm_ops *pm_ops;
 
 /**
  *	pm_set_ops - Set the global power method table. 
@@ -127,7 +127,7 @@
  *
  *	This function should be called after devices have been suspended.
  */
-int suspend_enter(suspend_state_t state)
+static int suspend_enter(suspend_state_t state)
 {
 	int error = 0;
 

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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux