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>
This commit is contained in:
Thomas Renninger
2013-07-15 10:15:09 +02:00
committed by Rafael J. Wysocki
parent ad81f0545e
commit 1696d9dc57
22 changed files with 10 additions and 305 deletions
-98
View File
@@ -345,104 +345,6 @@ static void acpi_bus_osc_support(void)
/* do we need to check other returned cap? Sounds no */
}
/* --------------------------------------------------------------------------
Event Management
-------------------------------------------------------------------------- */
#ifdef CONFIG_ACPI_PROC_EVENT
static DEFINE_SPINLOCK(acpi_bus_event_lock);
LIST_HEAD(acpi_bus_event_list);
DECLARE_WAIT_QUEUE_HEAD(acpi_bus_event_queue);
extern int event_is_open;
int acpi_bus_generate_proc_event4(const char *device_class, const char *bus_id, u8 type, int data)
{
struct acpi_bus_event *event;
unsigned long flags;
/* drop event on the floor if no one's listening */
if (!event_is_open)
return 0;
event = kzalloc(sizeof(struct acpi_bus_event), GFP_ATOMIC);
if (!event)
return -ENOMEM;
strcpy(event->device_class, device_class);
strcpy(event->bus_id, bus_id);
event->type = type;
event->data = data;
spin_lock_irqsave(&acpi_bus_event_lock, flags);
list_add_tail(&event->node, &acpi_bus_event_list);
spin_unlock_irqrestore(&acpi_bus_event_lock, flags);
wake_up_interruptible(&acpi_bus_event_queue);
return 0;
}
EXPORT_SYMBOL_GPL(acpi_bus_generate_proc_event4);
int acpi_bus_generate_proc_event(struct acpi_device *device, u8 type, int data)
{
if (!device)
return -EINVAL;
return acpi_bus_generate_proc_event4(device->pnp.device_class,
device->pnp.bus_id, type, data);
}
EXPORT_SYMBOL(acpi_bus_generate_proc_event);
int acpi_bus_receive_event(struct acpi_bus_event *event)
{
unsigned long flags;
struct acpi_bus_event *entry = NULL;
DECLARE_WAITQUEUE(wait, current);
if (!event)
return -EINVAL;
if (list_empty(&acpi_bus_event_list)) {
set_current_state(TASK_INTERRUPTIBLE);
add_wait_queue(&acpi_bus_event_queue, &wait);
if (list_empty(&acpi_bus_event_list))
schedule();
remove_wait_queue(&acpi_bus_event_queue, &wait);
set_current_state(TASK_RUNNING);
if (signal_pending(current))
return -ERESTARTSYS;
}
spin_lock_irqsave(&acpi_bus_event_lock, flags);
if (!list_empty(&acpi_bus_event_list)) {
entry = list_entry(acpi_bus_event_list.next,
struct acpi_bus_event, node);
list_del(&entry->node);
}
spin_unlock_irqrestore(&acpi_bus_event_lock, flags);
if (!entry)
return -ENODEV;
memcpy(event, entry, sizeof(struct acpi_bus_event));
kfree(entry);
return 0;
}
#endif /* CONFIG_ACPI_PROC_EVENT */
/* --------------------------------------------------------------------------
Notification Handling
-------------------------------------------------------------------------- */