]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
toshiba_acpi: Propagate the hotkey value via genetlink
authorAzael Avalos <coproscefalo@gmail.com>
Mon, 16 Nov 2015 03:33:46 +0000 (20:33 -0700)
committerDarren Hart <dvhart@linux.intel.com>
Sat, 21 Nov 2015 00:43:13 +0000 (16:43 -0800)
The driver uses genetlink to inform userspace of events generated by
the system, but the data passed is always zero as there is no data to
pass, except for the hotkey event.

This patch propagates the hotkey value via genetlink so userspace can
make use of it.

Signed-off-by: Azael Avalos <coproscefalo@gmail.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
drivers/platform/x86/toshiba_acpi.c

index c01302989ee47817eb37acac36755c63dd0b262c..3aed8a4618cefd2b04240998c6ed8f8ab5b7748a 100644 (file)
@@ -2808,7 +2808,8 @@ static void toshiba_acpi_notify(struct acpi_device *acpi_dev, u32 event)
 
        acpi_bus_generate_netlink_event(acpi_dev->pnp.device_class,
                                        dev_name(&acpi_dev->dev),
-                                       event, 0);
+                                       event, (event == 0x80) ?
+                                       dev->last_key_event : 0);
 }
 
 #ifdef CONFIG_PM_SLEEP