aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/bus.c
diff options
context:
space:
mode:
authorThomas Renninger <trenn@suse.de>2013-07-15 04:15:09 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-07-15 07:56:36 -0400
commit1696d9dc57e062ce5200f6a42a6aaada15b434bb (patch)
treef8deb88d4c8473dbbc5b140af9e1462a360d2def /drivers/acpi/bus.c
parentad81f0545ef01ea651886dddac4bef6cec930092 (diff)
ACPI: Remove the old /proc/acpi/event interface
It is quite some time that this one has been deprecated. Get rid of it. Should some really important user be overseen, it may be reverted and the userspace program worked on first, but it is time to do something to get rid of this old stuff... Signed-off-by: Thomas Renninger <trenn@suse.de> Acked-by: Matthew Garrett <matthew.garrett@nebula.com> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/bus.c')
-rw-r--r--drivers/acpi/bus.c98
1 files changed, 0 insertions, 98 deletions
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index a5bb33bab448..b6e9a3786e2d 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -346,104 +346,6 @@ static void acpi_bus_osc_support(void)
346} 346}
347 347
348/* -------------------------------------------------------------------------- 348/* --------------------------------------------------------------------------
349 Event Management
350 -------------------------------------------------------------------------- */
351
352#ifdef CONFIG_ACPI_PROC_EVENT
353static DEFINE_SPINLOCK(acpi_bus_event_lock);
354
355LIST_HEAD(acpi_bus_event_list);
356DECLARE_WAIT_QUEUE_HEAD(acpi_bus_event_queue);
357
358extern int event_is_open;
359
360int acpi_bus_generate_proc_event4(const char *device_class, const char *bus_id, u8 type, int data)
361{
362 struct acpi_bus_event *event;
363 unsigned long flags;
364
365 /* drop event on the floor if no one's listening */
366 if (!event_is_open)
367 return 0;
368
369 event = kzalloc(sizeof(struct acpi_bus_event), GFP_ATOMIC);
370 if (!event)
371 return -ENOMEM;
372
373 strcpy(event->device_class, device_class);
374 strcpy(event->bus_id, bus_id);
375 event->type = type;
376 event->data = data;
377
378 spin_lock_irqsave(&acpi_bus_event_lock, flags);
379 list_add_tail(&event->node, &acpi_bus_event_list);
380 spin_unlock_irqrestore(&acpi_bus_event_lock, flags);
381
382 wake_up_interruptible(&acpi_bus_event_queue);
383
384 return 0;
385
386}
387
388EXPORT_SYMBOL_GPL(acpi_bus_generate_proc_event4);
389
390int acpi_bus_generate_proc_event(struct acpi_device *device, u8 type, int data)
391{
392 if (!device)
393 return -EINVAL;
394 return acpi_bus_generate_proc_event4(device->pnp.device_class,
395 device->pnp.bus_id, type, data);
396}
397
398EXPORT_SYMBOL(acpi_bus_generate_proc_event);
399
400int acpi_bus_receive_event(struct acpi_bus_event *event)
401{
402 unsigned long flags;
403 struct acpi_bus_event *entry = NULL;
404
405 DECLARE_WAITQUEUE(wait, current);
406
407
408 if (!event)
409 return -EINVAL;
410
411 if (list_empty(&acpi_bus_event_list)) {
412
413 set_current_state(TASK_INTERRUPTIBLE);
414 add_wait_queue(&acpi_bus_event_queue, &wait);
415
416 if (list_empty(&acpi_bus_event_list))
417 schedule();
418
419 remove_wait_queue(&acpi_bus_event_queue, &wait);
420 set_current_state(TASK_RUNNING);
421
422 if (signal_pending(current))
423 return -ERESTARTSYS;
424 }
425
426 spin_lock_irqsave(&acpi_bus_event_lock, flags);
427 if (!list_empty(&acpi_bus_event_list)) {
428 entry = list_entry(acpi_bus_event_list.next,
429 struct acpi_bus_event, node);
430 list_del(&entry->node);
431 }
432 spin_unlock_irqrestore(&acpi_bus_event_lock, flags);
433
434 if (!entry)
435 return -ENODEV;
436
437 memcpy(event, entry, sizeof(struct acpi_bus_event));
438
439 kfree(entry);
440
441 return 0;
442}
443
444#endif /* CONFIG_ACPI_PROC_EVENT */
445
446/* --------------------------------------------------------------------------
447 Notification Handling 349 Notification Handling
448 -------------------------------------------------------------------------- */ 350 -------------------------------------------------------------------------- */
449 351