diff options
author | Azael Avalos <coproscefalo@gmail.com> | 2014-12-04 22:22:47 -0500 |
---|---|---|
committer | Darren Hart <dvhart@linux.intel.com> | 2014-12-03 13:10:18 -0500 |
commit | 805469053ba9dc3c14ebbc8287f2c051ba848aa4 (patch) | |
tree | 1e38684e821250c9e77da9761033893a6ca70ec1 /drivers/platform | |
parent | 71454d78d3c4b05d598822298459a94f04825f3f (diff) |
toshiba_acpi: Add keyboard backlight mode change event
A previous patch added support to handle more events.
This patch adds support to update the sysfs group whenever we receive
a 0x92 event, which indicates a change in the keyboard backlight mode,
removing the update group code from toshiba_kbd_bl_mode_store, as it is
no longer needed there.
Signed-off-by: Azael Avalos <coproscefalo@gmail.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r-- | drivers/platform/x86/toshiba_acpi.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c index 01e836987683..fc34a71866ed 100644 --- a/drivers/platform/x86/toshiba_acpi.c +++ b/drivers/platform/x86/toshiba_acpi.c | |||
@@ -1394,12 +1394,6 @@ static ssize_t toshiba_kbd_bl_mode_store(struct device *dev, | |||
1394 | if (ret) | 1394 | if (ret) |
1395 | return ret; | 1395 | return ret; |
1396 | 1396 | ||
1397 | /* Update sysfs entries on successful mode change*/ | ||
1398 | ret = sysfs_update_group(&toshiba->acpi_dev->dev.kobj, | ||
1399 | &toshiba_attr_group); | ||
1400 | if (ret) | ||
1401 | return ret; | ||
1402 | |||
1403 | toshiba->kbd_mode = mode; | 1397 | toshiba->kbd_mode = mode; |
1404 | } | 1398 | } |
1405 | 1399 | ||
@@ -2009,11 +2003,19 @@ error: | |||
2009 | static void toshiba_acpi_notify(struct acpi_device *acpi_dev, u32 event) | 2003 | static void toshiba_acpi_notify(struct acpi_device *acpi_dev, u32 event) |
2010 | { | 2004 | { |
2011 | struct toshiba_acpi_dev *dev = acpi_driver_data(acpi_dev); | 2005 | struct toshiba_acpi_dev *dev = acpi_driver_data(acpi_dev); |
2006 | int ret; | ||
2012 | 2007 | ||
2013 | switch (event) { | 2008 | switch (event) { |
2014 | case 0x80: /* Hotkeys and some system events */ | 2009 | case 0x80: /* Hotkeys and some system events */ |
2015 | toshiba_acpi_process_hotkeys(dev); | 2010 | toshiba_acpi_process_hotkeys(dev); |
2016 | break; | 2011 | break; |
2012 | case 0x92: /* Keyboard backlight mode changed */ | ||
2013 | /* Update sysfs entries */ | ||
2014 | ret = sysfs_update_group(&acpi_dev->dev.kobj, | ||
2015 | &toshiba_attr_group); | ||
2016 | if (ret) | ||
2017 | pr_err("Unable to update sysfs entries\n"); | ||
2018 | break; | ||
2017 | case 0x81: /* Unknown */ | 2019 | case 0x81: /* Unknown */ |
2018 | case 0x82: /* Unknown */ | 2020 | case 0x82: /* Unknown */ |
2019 | case 0x83: /* Unknown */ | 2021 | case 0x83: /* Unknown */ |