diff options
Diffstat (limited to 'drivers/acpi/bus.c')
-rw-r--r-- | drivers/acpi/bus.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index cbfc81579c9a..fb2cff9a2d24 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c | |||
@@ -286,15 +286,11 @@ DECLARE_WAIT_QUEUE_HEAD(acpi_bus_event_queue); | |||
286 | 286 | ||
287 | extern int event_is_open; | 287 | extern int event_is_open; |
288 | 288 | ||
289 | int acpi_bus_generate_proc_event(struct acpi_device *device, u8 type, int data) | 289 | int acpi_bus_generate_proc_event4(const char *device_class, const char *bus_id, u8 type, int data) |
290 | { | 290 | { |
291 | struct acpi_bus_event *event = NULL; | 291 | struct acpi_bus_event *event; |
292 | unsigned long flags = 0; | 292 | unsigned long flags = 0; |
293 | 293 | ||
294 | |||
295 | if (!device) | ||
296 | return -EINVAL; | ||
297 | |||
298 | /* drop event on the floor if no one's listening */ | 294 | /* drop event on the floor if no one's listening */ |
299 | if (!event_is_open) | 295 | if (!event_is_open) |
300 | return 0; | 296 | return 0; |
@@ -303,8 +299,8 @@ int acpi_bus_generate_proc_event(struct acpi_device *device, u8 type, int data) | |||
303 | if (!event) | 299 | if (!event) |
304 | return -ENOMEM; | 300 | return -ENOMEM; |
305 | 301 | ||
306 | strcpy(event->device_class, device->pnp.device_class); | 302 | strcpy(event->device_class, device_class); |
307 | strcpy(event->bus_id, device->pnp.bus_id); | 303 | strcpy(event->bus_id, bus_id); |
308 | event->type = type; | 304 | event->type = type; |
309 | event->data = data; | 305 | event->data = data; |
310 | 306 | ||
@@ -315,6 +311,17 @@ int acpi_bus_generate_proc_event(struct acpi_device *device, u8 type, int data) | |||
315 | wake_up_interruptible(&acpi_bus_event_queue); | 311 | wake_up_interruptible(&acpi_bus_event_queue); |
316 | 312 | ||
317 | return 0; | 313 | return 0; |
314 | |||
315 | } | ||
316 | |||
317 | EXPORT_SYMBOL_GPL(acpi_bus_generate_proc_event4); | ||
318 | |||
319 | int acpi_bus_generate_proc_event(struct acpi_device *device, u8 type, int data) | ||
320 | { | ||
321 | if (!device) | ||
322 | return -EINVAL; | ||
323 | return acpi_bus_generate_proc_event4(device->pnp.device_class, | ||
324 | device->pnp.bus_id, type, data); | ||
318 | } | 325 | } |
319 | 326 | ||
320 | EXPORT_SYMBOL(acpi_bus_generate_proc_event); | 327 | EXPORT_SYMBOL(acpi_bus_generate_proc_event); |