diff options
| author | Takashi Iwai <tiwai@suse.de> | 2014-09-22 10:12:16 +0200 | 
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2014-09-22 10:12:16 +0200 | 
| commit | 7639913f7298ed23a3f026ebcbb3b4e8850bcc39 (patch) | |
| tree | 26f08f061535015b748a96106f4869560e3afc63 /drivers/acpi/scan.c | |
| parent | 4e9c58cb1219bcbcf6e698ed6541b275048bfa88 (diff) | |
| parent | f8fb117034847634bff8f02632151f7535981fa1 (diff) | |
Merge branch 'topic/hda-jack-rework' into for-next
This is a merge of rework of HD-audio jack event handling code.
It extends the jack table to allow multiple callbacks.
Diffstat (limited to 'drivers/acpi/scan.c')
| -rw-r--r-- | drivers/acpi/scan.c | 17 | 
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 0a817ad24f16..9a9298994e26 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -922,12 +922,17 @@ static void acpi_device_notify(acpi_handle handle, u32 event, void *data)  	device->driver->ops.notify(device, event);  } -static acpi_status acpi_device_notify_fixed(void *data) +static void acpi_device_notify_fixed(void *data)  {  	struct acpi_device *device = data;  	/* Fixed hardware devices have no handles */  	acpi_device_notify(NULL, ACPI_FIXED_HARDWARE_EVENT, device); +} + +static acpi_status acpi_device_fixed_event(void *data) +{ +	acpi_os_execute(OSL_NOTIFY_HANDLER, acpi_device_notify_fixed, data);  	return AE_OK;  } @@ -938,12 +943,12 @@ static int acpi_device_install_notify_handler(struct acpi_device *device)  	if (device->device_type == ACPI_BUS_TYPE_POWER_BUTTON)  		status =  		    acpi_install_fixed_event_handler(ACPI_EVENT_POWER_BUTTON, -						     acpi_device_notify_fixed, +						     acpi_device_fixed_event,  						     device);  	else if (device->device_type == ACPI_BUS_TYPE_SLEEP_BUTTON)  		status =  		    acpi_install_fixed_event_handler(ACPI_EVENT_SLEEP_BUTTON, -						     acpi_device_notify_fixed, +						     acpi_device_fixed_event,  						     device);  	else  		status = acpi_install_notify_handler(device->handle, @@ -960,10 +965,10 @@ static void acpi_device_remove_notify_handler(struct acpi_device *device)  {  	if (device->device_type == ACPI_BUS_TYPE_POWER_BUTTON)  		acpi_remove_fixed_event_handler(ACPI_EVENT_POWER_BUTTON, -						acpi_device_notify_fixed); +						acpi_device_fixed_event);  	else if (device->device_type == ACPI_BUS_TYPE_SLEEP_BUTTON)  		acpi_remove_fixed_event_handler(ACPI_EVENT_SLEEP_BUTTON, -						acpi_device_notify_fixed); +						acpi_device_fixed_event);  	else  		acpi_remove_notify_handler(device->handle, ACPI_DEVICE_NOTIFY,  					   acpi_device_notify); @@ -975,7 +980,7 @@ static int acpi_device_probe(struct device *dev)  	struct acpi_driver *acpi_drv = to_acpi_driver(dev->driver);  	int ret; -	if (acpi_dev->handler) +	if (acpi_dev->handler && !acpi_is_pnp_device(acpi_dev))  		return -EINVAL;  	if (!acpi_drv->ops.add)  | 
