From b4b7ff4b08e691656c9d77c758fc355833128ac0 Mon Sep 17 00:00:00 2001 From: André Fabian Silva Delgado Date: Wed, 20 Jan 2016 14:01:31 -0300 Subject: Linux-libre 4.4-gnu --- drivers/platform/x86/sony-laptop.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'drivers/platform/x86/sony-laptop.c') diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c index aeb80d1c2..f73c29558 100644 --- a/drivers/platform/x86/sony-laptop.c +++ b/drivers/platform/x86/sony-laptop.c @@ -1204,6 +1204,8 @@ static void sony_nc_notify(struct acpi_device *device, u32 event) { u32 real_ev = event; u8 ev_type = 0; + int ret; + dprintk("sony_nc_notify, event: 0x%.2x\n", event); if (event >= 0x90) { @@ -1225,13 +1227,12 @@ static void sony_nc_notify(struct acpi_device *device, u32 event) case 0x0100: case 0x0127: ev_type = HOTKEY; - real_ev = sony_nc_hotkeys_decode(event, handle); + ret = sony_nc_hotkeys_decode(event, handle); - if (real_ev > 0) - sony_laptop_report_input_event(real_ev); - else - /* restore the original event for reporting */ - real_ev = event; + if (ret > 0) { + sony_laptop_report_input_event(ret); + real_ev = ret; + } break; -- cgit v1.2.3-54-g00ecf