mirror of
https://github.com/adulau/aha.git
synced 2025-01-02 14:13:18 +00:00
ACPI: video: add struct acpi_device to struct acpi_video_bus.
- Use it instead of acpi_bus_get_device() in acpi_video_bus_notify() and use the one from struct acpi_video_device in acpi_video_device_notify(). Signed-off-by: Patrick Mochel <mochel@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
parent
4159857288
commit
e6afa0de14
1 changed files with 4 additions and 4 deletions
|
@ -118,6 +118,7 @@ struct acpi_video_enumerated_device {
|
||||||
|
|
||||||
struct acpi_video_bus {
|
struct acpi_video_bus {
|
||||||
acpi_handle handle;
|
acpi_handle handle;
|
||||||
|
struct acpi_device *device;
|
||||||
u8 dos_setting;
|
u8 dos_setting;
|
||||||
struct acpi_video_enumerated_device *attached_array;
|
struct acpi_video_enumerated_device *attached_array;
|
||||||
u8 attached_count;
|
u8 attached_count;
|
||||||
|
@ -1624,8 +1625,7 @@ static void acpi_video_bus_notify(acpi_handle handle, u32 event, void *data)
|
||||||
if (!video)
|
if (!video)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (acpi_bus_get_device(handle, &device))
|
device = video->device;
|
||||||
return;
|
|
||||||
|
|
||||||
switch (event) {
|
switch (event) {
|
||||||
case ACPI_VIDEO_NOTIFY_SWITCH: /* User request that a switch occur,
|
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)
|
||||||
if (!video_device)
|
if (!video_device)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (acpi_bus_get_device(handle, &device))
|
device = video_device->dev;
|
||||||
return;
|
|
||||||
|
|
||||||
switch (event) {
|
switch (event) {
|
||||||
case ACPI_VIDEO_NOTIFY_SWITCH: /* change in status (cycle output device) */
|
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)
|
||||||
memset(video, 0, sizeof(struct acpi_video_bus));
|
memset(video, 0, sizeof(struct acpi_video_bus));
|
||||||
|
|
||||||
video->handle = device->handle;
|
video->handle = device->handle;
|
||||||
|
video->device = device;
|
||||||
strcpy(acpi_device_name(device), ACPI_VIDEO_BUS_NAME);
|
strcpy(acpi_device_name(device), ACPI_VIDEO_BUS_NAME);
|
||||||
strcpy(acpi_device_class(device), ACPI_VIDEO_CLASS);
|
strcpy(acpi_device_class(device), ACPI_VIDEO_CLASS);
|
||||||
acpi_driver_data(device) = video;
|
acpi_driver_data(device) = video;
|
||||||
|
|
Loading…
Reference in a new issue