ACPI: Add stubs for (un)register_acpi_bus_type
authorMatthew Garrett <mjg@redhat.com>
Fri, 11 May 2012 08:08:25 +0000 (16:08 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 May 2012 00:03:12 +0000 (17:03 -0700)
It's unreasonable to have CONFIG_ACPI for these in drivers, so add some
stub functions.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/acpi/glue.c
include/acpi/acpi_bus.h

index 29a4a5c8ee009da357b55f652c7bcb8f01a270b6..1564e0927c21de130cd134be6371161298709b5e 100644 (file)
@@ -69,6 +69,7 @@ static struct acpi_bus_type *acpi_get_bus_type(struct bus_type *type)
        up_read(&bus_type_sem);
        return ret;
 }
+EXPORT_SYMBOL_GPL(register_acpi_bus_type);
 
 static int acpi_find_bridge_device(struct device *dev, acpi_handle * handle)
 {
@@ -85,6 +86,7 @@ static int acpi_find_bridge_device(struct device *dev, acpi_handle * handle)
        up_read(&bus_type_sem);
        return ret;
 }
+EXPORT_SYMBOL_GPL(unregister_acpi_bus_type);
 
 /* Get device's handler per its address under its parent */
 struct acpi_find_child {
index f1c8ca60e8242b610b036074c459094a22d533f1..c909984d07200dfc208d811b20c04fa260b15df3 100644 (file)
@@ -407,6 +407,11 @@ static inline int acpi_pm_device_sleep_wake(struct device *dev, bool enable)
 }
 #endif
 
+#else  /* CONFIG_ACPI */
+
+static int register_acpi_bus_type(struct acpi_bus_type *bus) { return 0; }
+static int unregister_acpi_bus_type(struct acpi_bus_type *bus) { return 0; }
+
 #endif                         /* CONFIG_ACPI */
 
 #endif /*__ACPI_BUS_H__*/