@@ -155,6 +155,13 @@ struct pnp_protocol pnpacpi_protocol = {
#endif
};
+struct acpi_device *pnp_acpi_device(struct pnp_dev *dev)
+{
+ if (dev->protocol == &pnpacpi_protocol)
+ return dev->data;
+ return NULL;
+}
+EXPORT_SYMBOL_GPL(pnp_acpi_device);
static int __init pnpacpi_add_device(struct acpi_device *device)
{
acpi_handle temp = NULL;
@@ -335,16 +335,11 @@ extern struct pnp_protocol pnpbios_protocol;
#endif
#ifdef CONFIG_PNPACPI
-extern struct pnp_protocol pnpacpi_protocol;
-static inline struct acpi_device *pnp_acpi_device(struct pnp_dev *dev)
-{
- if (dev->protocol == &pnpacpi_protocol)
- return dev->data;
- return NULL;
-}
+extern struct acpi_device *pnp_acpi_device(struct pnp_dev *dev);
#else
-#define pnp_acpi_device(dev) 0
+static inline struct acpi_device *pnp_acpi_device(struct pnp_dev *dev)
+{ return NULL; }
#endif
/* status */