aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/bus.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/bus.c')
-rw-r--r--drivers/acpi/bus.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index 1b4cf984b081..8df325dafe0f 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -122,6 +122,31 @@ int acpi_bus_get_status(struct acpi_device *device)
122 122
123EXPORT_SYMBOL(acpi_bus_get_status); 123EXPORT_SYMBOL(acpi_bus_get_status);
124 124
125void acpi_bus_private_data_handler(acpi_handle handle,
126 u32 function, void *context)
127{
128 return;
129}
130EXPORT_SYMBOL(acpi_bus_private_data_handler);
131
132int acpi_bus_get_private_data(acpi_handle handle, void **data)
133{
134 acpi_status status = AE_OK;
135
136 if (!*data)
137 return -EINVAL;
138
139 status = acpi_get_data(handle, acpi_bus_private_data_handler, data);
140 if (ACPI_FAILURE(status) || !*data) {
141 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No context for object [%p]\n",
142 handle));
143 return -ENODEV;
144 }
145
146 return 0;
147}
148EXPORT_SYMBOL(acpi_bus_get_private_data);
149
125/* -------------------------------------------------------------------------- 150/* --------------------------------------------------------------------------
126 Power Management 151 Power Management
127 -------------------------------------------------------------------------- */ 152 -------------------------------------------------------------------------- */