aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/platform/x86/ideapad_acpi.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/platform/x86/ideapad_acpi.c b/drivers/platform/x86/ideapad_acpi.c
index c87693c7dde0..e07d6072e75c 100644
--- a/drivers/platform/x86/ideapad_acpi.c
+++ b/drivers/platform/x86/ideapad_acpi.c
@@ -379,7 +379,21 @@ static int ideapad_acpi_remove(struct acpi_device *adevice, int type)
379 379
380static void ideapad_acpi_notify(struct acpi_device *adevice, u32 event) 380static void ideapad_acpi_notify(struct acpi_device *adevice, u32 event)
381{ 381{
382 ideapad_sync_rfk_state(adevice); 382 acpi_handle handle = adevice->handle;
383 unsigned long vpc1, vpc2, vpc_bit;
384
385 if (read_ec_data(handle, 0x10, &vpc1))
386 return;
387 if (read_ec_data(handle, 0x1A, &vpc2))
388 return;
389
390 vpc1 = (vpc2 << 8) | vpc1;
391 for (vpc_bit = 0; vpc_bit < 16; vpc_bit++) {
392 if (test_bit(vpc_bit, &vpc1)) {
393 if (vpc_bit == 9)
394 ideapad_sync_rfk_state(adevice);
395 }
396 }
383} 397}
384 398
385static struct acpi_driver ideapad_acpi_driver = { 399static struct acpi_driver ideapad_acpi_driver = {