diff options
| -rw-r--r-- | drivers/acpi/video.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 9feb633087a9..cee9a50fdf91 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c | |||
| @@ -118,6 +118,7 @@ struct acpi_video_enumerated_device { | |||
| 118 | 118 | ||
| 119 | struct acpi_video_bus { | 119 | struct acpi_video_bus { |
| 120 | acpi_handle handle; | 120 | acpi_handle handle; |
| 121 | struct acpi_device *device; | ||
| 121 | u8 dos_setting; | 122 | u8 dos_setting; |
| 122 | struct acpi_video_enumerated_device *attached_array; | 123 | struct acpi_video_enumerated_device *attached_array; |
| 123 | u8 attached_count; | 124 | u8 attached_count; |
| @@ -1624,8 +1625,7 @@ static void acpi_video_bus_notify(acpi_handle handle, u32 event, void *data) | |||
| 1624 | if (!video) | 1625 | if (!video) |
| 1625 | return; | 1626 | return; |
| 1626 | 1627 | ||
| 1627 | if (acpi_bus_get_device(handle, &device)) | 1628 | device = video->device; |
| 1628 | return; | ||
| 1629 | 1629 | ||
| 1630 | switch (event) { | 1630 | switch (event) { |
| 1631 | case ACPI_VIDEO_NOTIFY_SWITCH: /* User request that a switch occur, | 1631 | case ACPI_VIDEO_NOTIFY_SWITCH: /* User request that a switch occur, |
| @@ -1668,8 +1668,7 @@ static void acpi_video_device_notify(acpi_handle handle, u32 event, void *data) | |||
| 1668 | if (!video_device) | 1668 | if (!video_device) |
| 1669 | return; | 1669 | return; |
| 1670 | 1670 | ||
| 1671 | if (acpi_bus_get_device(handle, &device)) | 1671 | device = video_device->dev; |
| 1672 | return; | ||
| 1673 | 1672 | ||
| 1674 | switch (event) { | 1673 | switch (event) { |
| 1675 | case ACPI_VIDEO_NOTIFY_SWITCH: /* change in status (cycle output device) */ | 1674 | case ACPI_VIDEO_NOTIFY_SWITCH: /* change in status (cycle output device) */ |
| @@ -1708,6 +1707,7 @@ static int acpi_video_bus_add(struct acpi_device *device) | |||
| 1708 | memset(video, 0, sizeof(struct acpi_video_bus)); | 1707 | memset(video, 0, sizeof(struct acpi_video_bus)); |
| 1709 | 1708 | ||
| 1710 | video->handle = device->handle; | 1709 | video->handle = device->handle; |
| 1710 | video->device = device; | ||
| 1711 | strcpy(acpi_device_name(device), ACPI_VIDEO_BUS_NAME); | 1711 | strcpy(acpi_device_name(device), ACPI_VIDEO_BUS_NAME); |
| 1712 | strcpy(acpi_device_class(device), ACPI_VIDEO_CLASS); | 1712 | strcpy(acpi_device_class(device), ACPI_VIDEO_CLASS); |
| 1713 | acpi_driver_data(device) = video; | 1713 | acpi_driver_data(device) = video; |
