aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/pnp/pnpacpi/core.c3
-rw-r--r--include/linux/pnp.h13
2 files changed, 15 insertions, 1 deletions
diff --git a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c
index b2348fc2378e..5314bf630bc4 100644
--- a/drivers/pnp/pnpacpi/core.c
+++ b/drivers/pnp/pnpacpi/core.c
@@ -144,7 +144,7 @@ static int pnpacpi_resume(struct pnp_dev *dev)
144} 144}
145#endif 145#endif
146 146
147static struct pnp_protocol pnpacpi_protocol = { 147struct pnp_protocol pnpacpi_protocol = {
148 .name = "Plug and Play ACPI", 148 .name = "Plug and Play ACPI",
149 .get = pnpacpi_get_resources, 149 .get = pnpacpi_get_resources,
150 .set = pnpacpi_set_resources, 150 .set = pnpacpi_set_resources,
@@ -154,6 +154,7 @@ static struct pnp_protocol pnpacpi_protocol = {
154 .resume = pnpacpi_resume, 154 .resume = pnpacpi_resume,
155#endif 155#endif
156}; 156};
157EXPORT_SYMBOL(pnpacpi_protocol);
157 158
158static int __init pnpacpi_add_device(struct acpi_device *device) 159static int __init pnpacpi_add_device(struct acpi_device *device)
159{ 160{
diff --git a/include/linux/pnp.h b/include/linux/pnp.h
index fddfafaed024..7c4193eb0072 100644
--- a/include/linux/pnp.h
+++ b/include/linux/pnp.h
@@ -334,6 +334,19 @@ extern struct pnp_protocol pnpbios_protocol;
334#define pnp_device_is_pnpbios(dev) 0 334#define pnp_device_is_pnpbios(dev) 0
335#endif 335#endif
336 336
337#ifdef CONFIG_PNPACPI
338extern struct pnp_protocol pnpacpi_protocol;
339
340static inline struct acpi_device *pnp_acpi_device(struct pnp_dev *dev)
341{
342 if (dev->protocol == &pnpacpi_protocol)
343 return dev->data;
344 return NULL;
345}
346#else
347#define pnp_acpi_device(dev) 0
348#endif
349
337/* status */ 350/* status */
338#define PNP_READY 0x0000 351#define PNP_READY 0x0000
339#define PNP_ATTACHED 0x0001 352#define PNP_ATTACHED 0x0001