From 401d140afd88042b5666c09b336bdac560eb713e Mon Sep 17 00:00:00 2001 From: Luca Tettamanti Date: Thu, 2 Aug 2012 15:30:27 +0200 Subject: [PATCH] --- yaml --- r: 329534 b: refs/heads/master c: 8a37c65df9dcbd1c891df2b4a94157999b654841 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/acpi/video.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index f3421c5f928b..3568a47d5868 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c49170742d6928b16fb3839b47a94cc41630dbe0 +refs/heads/master: 8a37c65df9dcbd1c891df2b4a94157999b654841 diff --git a/trunk/drivers/acpi/video.c b/trunk/drivers/acpi/video.c index 1e0a9e17c31d..f94d4c818fc7 100644 --- a/trunk/drivers/acpi/video.c +++ b/trunk/drivers/acpi/video.c @@ -1448,8 +1448,7 @@ static void acpi_video_bus_notify(struct acpi_device *device, u32 event) case ACPI_VIDEO_NOTIFY_SWITCH: /* User requested a switch, * most likely via hotkey. */ acpi_bus_generate_proc_event(device, event, 0); - if (!acpi_notifier_call_chain(device, event, 0)) - keycode = KEY_SWITCHVIDEOMODE; + keycode = KEY_SWITCHVIDEOMODE; break; case ACPI_VIDEO_NOTIFY_PROBE: /* User plugged in or removed a video @@ -1479,8 +1478,9 @@ static void acpi_video_bus_notify(struct acpi_device *device, u32 event) break; } - if (event != ACPI_VIDEO_NOTIFY_SWITCH) - acpi_notifier_call_chain(device, event, 0); + if (acpi_notifier_call_chain(device, event, 0)) + /* Something vetoed the keypress. */ + keycode = 0; if (keycode) { input_report_key(input, keycode, 1);