Skip to contentSkip to conversation

drivers/base/power/: make 2 functions static

PATCH In review Adrian Bunk 2 participants 3 messages Jul 29, 2007

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/base/power/: make 2 functions static

suspend_device() and resume_device() can now become static.

---

 drivers/base/power/power.h   |    6 ------
 drivers/base/power/resume.c  |    2 +-
 drivers/base/power/suspend.c |    2 +-
 3 files changed, 2 insertions(+), 8 deletions(-)
drivers/base/power/power.h renamed from drivers/base/power/power.h.old +0 -6
@@ -55,12 +55,6 @@
 
 extern void dpm_resume(void);
 extern void dpm_power_up(void);
-extern int resume_device(struct device *);
-
-/*
- * suspend.c
- */
-extern int suspend_device(struct device *, pm_message_t);
 
 #else /* CONFIG_PM */
 
drivers/base/power/resume.c renamed from drivers/base/power/resume.c.old +1 -1
@@ -20,7 +20,7 @@
  *
  */
 
-int resume_device(struct device * dev)
+static int resume_device(struct device * dev)
 {
 	int error = 0;
 
drivers/base/power/suspend.c renamed from drivers/base/power/suspend.c.old +1 -1
@@ -54,7 +54,7 @@
  *	@state:	Power state device is entering.
  */
 
-int suspend_device(struct device * dev, pm_message_t state)
+static int suspend_device(struct device * dev, pm_message_t state)
 {
 	int error = 0;
 
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Adrian Bunk

suspend_device() and resume_device() can now become static.

---

Quoted 45 lines
 drivers/base/power/power.h   |    6 ------
 drivers/base/power/resume.c  |    2 +-
 drivers/base/power/suspend.c |    2 +-
 3 files changed, 2 insertions(+), 8 deletions(-)
drivers/base/power/power.h renamed from drivers/base/power/power.h.old +0 -6
@@ -55,12 +55,6 @@
 
 extern void dpm_resume(void);
 extern void dpm_power_up(void);
-extern int resume_device(struct device *);
-
-/*
- * suspend.c
- */
-extern int suspend_device(struct device *, pm_message_t);
 
 #else /* CONFIG_PM */
 
drivers/base/power/resume.c renamed from drivers/base/power/resume.c.old +1 -1
@@ -20,7 +20,7 @@
  *
  */
 
-int resume_device(struct device * dev)
+static int resume_device(struct device * dev)
 {
 	int error = 0;
 
drivers/base/power/suspend.c renamed from drivers/base/power/suspend.c.old +1 -1
@@ -54,7 +54,7 @@
  *	@state:	Power state device is entering.
  */
 
-int suspend_device(struct device * dev, pm_message_t state)
+static int suspend_device(struct device * dev, pm_message_t state)
 {
 	int error = 0;
 
Signature · 1 line
"Premature optimization is the root of all evil." - Donald Knuth
Acked-by on v1 1/1
#2 lore raw
In reply to Adrian Bunk
Quoted 5 lines · Adrian Bunk

suspend_device() and resume_device() can now become static.

---

Quoted 45 lines
 drivers/base/power/power.h   |    6 ------
 drivers/base/power/resume.c  |    2 +-
 drivers/base/power/suspend.c |    2 +-
 3 files changed, 2 insertions(+), 8 deletions(-)
drivers/base/power/power.h renamed from drivers/base/power/power.h.old +0 -6
@@ -55,12 +55,6 @@
 
 extern void dpm_resume(void);
 extern void dpm_power_up(void);
-extern int resume_device(struct device *);
-
-/*
- * suspend.c
- */
-extern int suspend_device(struct device *, pm_message_t);
 
 #else /* CONFIG_PM */
 
drivers/base/power/resume.c renamed from drivers/base/power/resume.c.old +1 -1
@@ -20,7 +20,7 @@
  *
  */
 
-int resume_device(struct device * dev)
+static int resume_device(struct device * dev)
 {
 	int error = 0;
 
drivers/base/power/suspend.c renamed from drivers/base/power/suspend.c.old +1 -1
@@ -54,7 +54,7 @@
  *	@state:	Power state device is entering.
  */
 
-int suspend_device(struct device * dev, pm_message_t state)
+static int suspend_device(struct device * dev, pm_message_t state)
 {
 	int error = 0;
 
Signature · 1 line
"Premature optimization is the root of all evil." - Donald Knuth