Skip to contentSkip to conversation

drivers/acpi: fix driver compile errors when CONFIG_PM_SLEEP is undefined

PATCH In review Shuah Khan 2 participants 8 messages Feb 13, 2014 – Feb 18, 2014

Subsystems (2)
lore
Share & tools
lore

Shuah Khan

author
#0 lore raw

cover drivers/acpi: fix driver compile errors when CONFIG_PM_SLEEP is undefined

The following acpi drivers fail with compile errors when CONFIG_PM_SLEEP is undefined.

Shuah Khan (6):
drivers/acpi: fix ac driver compile error when CONFIG_PM_SLEEP is
undefined
drivers/acpi: fix battery driver compile error when CONFIG_PM_SLEEP is
undefined
drivers/acpi: fix button driver compile error when CONFIG_PM_SLEEP is
undefined
drivers/acpi: fix fan driver compile error when CONFIG_PM_SLEEP is
undefined
drivers/acpi: fix sbs driver compile error when CONFIG_PM_SLEEP is
undefined
drivers/acpi: fix thermal driver compile error when CONFIG_PM_SLEEP
is undefined

 drivers/acpi/ac.c      |    2 ++
 drivers/acpi/battery.c |    2 ++
 drivers/acpi/button.c  |    2 ++
 drivers/acpi/fan.c     |    3 +++
 drivers/acpi/sbs.c     |    2 ++
 drivers/acpi/thermal.c |    2 ++
 6 files changed, 13 insertions(+)
Signature · 1 line
1.7.10.4
author
#1 lore raw

PATCH 1/6 drivers/acpi: fix ac driver compile error when CONFIG_PM_SLEEP is undefined

ac driver defines acpi_ac_resume() when CONFIG_PM_SLEEP is defined. This results in the following compile error when CONFIG_PM_SLEEP is undefined.

drivers/acpi/ac.c:248:8: error: ‘acpi_ac_resume’ undeclared here (not in a function)

---
 drivers/acpi/ac.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/acpi/ac.c +2 -0
index e7515aa..6f190bc 100644
@@ -243,6 +243,8 @@ static int acpi_ac_resume(struct device *dev)
 		kobject_uevent(&ac->charger.dev->kobj, KOBJ_CHANGE);
 	return 0;
 }
+#else
+#define acpi_ac_resume NULL
 #endif
 static SIMPLE_DEV_PM_OPS(acpi_ac_pm_ops, NULL, acpi_ac_resume);
 
Signature · 1 line
1.7.10.4
author
#2 lore raw

PATCH 2/6 drivers/acpi: fix battery driver compile error when CONFIG_PM_SLEEP is undefined

In reply to Shuah Khan

battery driver defines acpi_battery_resume() when CONFIG_PM_SLEEP is defined. This results in the following compile error when CONFIG_PM_SLEEP is undefined.

drivers/acpi/battery.c:847:8: error: ‘acpi_battery_resume’ undeclared here (not in a function)

---
 drivers/acpi/battery.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/acpi/battery.c +2 -0
index 018a428..797a693 100644
@@ -841,6 +841,8 @@ static int acpi_battery_resume(struct device *dev)
 	acpi_battery_update(battery);
 	return 0;
 }
+#else
+#define acpi_battery_resume NULL
 #endif
 
 static SIMPLE_DEV_PM_OPS(acpi_battery_pm, NULL, acpi_battery_resume);
Signature · 6 lines
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
author
#3 lore raw

PATCH 3/6 drivers/acpi: fix button driver compile error when CONFIG_PM_SLEEP is undefined

In reply to Shuah Khan

button driver defines acpi_button_resume() when CONFIG_PM_SLEEP is defined. This results in the following compile error when CONFIG_PM_SLEEP is undefined.

drivers/acpi/button.c:85:8: error: ‘acpi_button_resume’ undeclared here (not in a function)

---
 drivers/acpi/button.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/acpi/button.c +2 -0
index 11c11f6..714e957 100644
@@ -80,6 +80,8 @@ static void acpi_button_notify(struct acpi_device *device, u32 event);
 
 #ifdef CONFIG_PM_SLEEP
 static int acpi_button_resume(struct device *dev);
+#else
+#define acpi_button_resume NULL
 #endif
 static SIMPLE_DEV_PM_OPS(acpi_button_pm, NULL, acpi_button_resume);
 
Signature · 1 line
1.7.10.4
author
#4 lore raw

PATCH 4/6 drivers/acpi: fix fan driver compile error when CONFIG_PM_SLEEP is undefined

In reply to Shuah Khan

fan driver defines acpi_fan_suspend() and acpi_fan_resume() when CONFIG_PM_SLEEP is defined. This results in the following compile error when CONFIG_PM_SLEEP is undefined.

drivers/acpi/fan.c:60:8: error: ‘acpi_fan_suspend’ undeclared here (not in a function) drivers/acpi/fan.c:60:8: error: ‘acpi_fan_resume’ undeclared here (not in a function)

---
 drivers/acpi/fan.c |    3 +++
 1 file changed, 3 insertions(+)
drivers/acpi/fan.c +3 -0
index 1fb6290..09e423f 100644
@@ -55,6 +55,9 @@ MODULE_DEVICE_TABLE(acpi, fan_device_ids);
 #ifdef CONFIG_PM_SLEEP
 static int acpi_fan_suspend(struct device *dev);
 static int acpi_fan_resume(struct device *dev);
+#else
+#define acpi_fan_suspend NULL
+#define acpi_fan_resume NULL
 #endif
 static SIMPLE_DEV_PM_OPS(acpi_fan_pm, acpi_fan_suspend, acpi_fan_resume);
 
Signature · 6 lines
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
author
#5 lore raw

PATCH 5/6 drivers/acpi: fix sbs driver compile error when CONFIG_PM_SLEEP is undefined

In reply to Shuah Khan

sbs driver defines acpi_sbs_resume() when CONFIG_PM_SLEEP is defined. This results in the following compile error when CONFIG_PM_SLEEP is undefined.

CC [M] drivers/acpi/sbs.o
drivers/acpi/sbs.c:674:8: error: ‘acpi_sbs_resume’ undeclared here (not in a function)

---
 drivers/acpi/sbs.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/acpi/sbs.c +2 -0
index d465ae6..48c92c6 100644
@@ -668,6 +668,8 @@ static int acpi_sbs_resume(struct device *dev)
 	acpi_sbs_callback(sbs);
 	return 0;
 }
+#else
+#define acpi_sbs_resume NULL
 #endif
 
 static SIMPLE_DEV_PM_OPS(acpi_sbs_pm, NULL, acpi_sbs_resume);
Signature · 1 line
1.7.10.4
author
#6 lore raw

PATCH 6/6 drivers/acpi: fix thermal driver compile error when CONFIG_PM_SLEEP is undefined

In reply to Shuah Khan

thermal driver defines acpi_thermal_resume() when CONFIG_PM_SLEEP is defined. This results in the following compile error when CONFIG_PM_SLEEP is undefined.

CC drivers/acpi/thermal.o
drivers/acpi/thermal.c:107:8: error: ‘acpi_thermal_resume’ undeclared here (not in a function) make[2]: *** [drivers/acpi/thermal.o] Error 1

---
 drivers/acpi/thermal.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/acpi/thermal.c +2 -0
index 8349a55..08626c8 100644
@@ -102,6 +102,8 @@ MODULE_DEVICE_TABLE(acpi, thermal_device_ids);
 
 #ifdef CONFIG_PM_SLEEP
 static int acpi_thermal_resume(struct device *dev);
+#else
+#define acpi_thermal_resume NULL
 #endif
 static SIMPLE_DEV_PM_OPS(acpi_thermal_pm, NULL, acpi_thermal_resume);
 
Signature · 1 line
1.7.10.4
#7 lore raw
In reply to Shuah Khan
Quoted 2 lines · Shuah Khan

The following acpi drivers fail with compile errors when CONFIG_PM_SLEEP is undefined.

I'm going to push all of these patches as fixes for 3.14. Thanks!

Quoted 23 lines

Shuah Khan (6):
drivers/acpi: fix ac driver compile error when CONFIG_PM_SLEEP is
undefined
drivers/acpi: fix battery driver compile error when CONFIG_PM_SLEEP is
undefined
drivers/acpi: fix button driver compile error when CONFIG_PM_SLEEP is
undefined
drivers/acpi: fix fan driver compile error when CONFIG_PM_SLEEP is
undefined
drivers/acpi: fix sbs driver compile error when CONFIG_PM_SLEEP is
undefined
drivers/acpi: fix thermal driver compile error when CONFIG_PM_SLEEP
is undefined

 drivers/acpi/ac.c      |    2 ++
 drivers/acpi/battery.c |    2 ++
 drivers/acpi/button.c  |    2 ++
 drivers/acpi/fan.c     |    3 +++
 drivers/acpi/sbs.c     |    2 ++
 drivers/acpi/thermal.c |    2 ++
 6 files changed, 13 insertions(+)
Signature · 2 lines
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.