Re: [Resend PATCH V2 2/7] usb: Bind devices to ACPI devices when possible

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

 



On Sat, May 05, 2012 at 07:47:43AM -0700, Greg KH wrote:

> I think the problem is that these functions aren't exported to modules,
> not that they aren't there for non-ACPI systems (although that too is
> probably a problem...)

Bleah. Of course.

commit 050f1fd505db7969efc0ca245d2c17f279f42fa2
Author: Matthew Garrett <mjg@xxxxxxxxxx>
Date:   Sat May 5 01:21:45 2012 -0400

    ACPI: Add stubs for (un)register_acpi_bus_type
    
    It's unreasonable to have CONFIG_ACPI for these in drivers, so add some
    stub functions.
    
    Signed-off-by: Matthew Garrett <mjg@xxxxxxxxxx>

diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c
index 29a4a5c..243ee85 100644
--- a/drivers/acpi/glue.c
+++ b/drivers/acpi/glue.c
@@ -39,6 +39,7 @@ int register_acpi_bus_type(struct acpi_bus_type *type)
 	}
 	return -ENODEV;
 }
+EXPORT_SYMBOL_GPL(register_acpi_bus_type);
 
 int unregister_acpi_bus_type(struct acpi_bus_type *type)
 {
@@ -54,6 +55,7 @@ int unregister_acpi_bus_type(struct acpi_bus_type *type)
 	}
 	return -ENODEV;
 }
+EXPORT_SYMBOL_GPL(unregister_acpi_bus_type);
 
 static struct acpi_bus_type *acpi_get_bus_type(struct bus_type *type)
 {
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index 30a9250..714b7d7 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -431,6 +431,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__*/

-- 
Matthew Garrett | mjg59@xxxxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux