diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2009-11-17 19:05:19 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2009-12-15 17:35:26 -0500 |
commit | 9065ce4500085b9ca66b19d3c4d21a73cb410173 (patch) | |
tree | c487e3f9b3b56cc829ea2362a33b888a42d83f8f /drivers | |
parent | c4da6940a7a41c72781ff2d62ebd4b99f3749f14 (diff) |
PNP: add interface to retrieve ACPI device from a PNPACPI device
Add pnp_acpi_device(pnp_dev), which takes a PNP device and returns the
associated ACPI device (or NULL, if the device is not a PNPACPI device).
This allows us to write a PNP driver that can manage both traditional
PNPBIOS and ACPI devices, treating ACPI-only functionality as an optional
extension.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pnp/pnpacpi/core.c | 3 |
1 files changed, 2 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 | ||
147 | static struct pnp_protocol pnpacpi_protocol = { | 147 | struct 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 | }; |
157 | EXPORT_SYMBOL(pnpacpi_protocol); | ||
157 | 158 | ||
158 | static int __init pnpacpi_add_device(struct acpi_device *device) | 159 | static int __init pnpacpi_add_device(struct acpi_device *device) |
159 | { | 160 | { |