aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/classmate-laptop.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/platform/x86/classmate-laptop.c')
-rw-r--r--drivers/platform/x86/classmate-laptop.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/platform/x86/classmate-laptop.c b/drivers/platform/x86/classmate-laptop.c
index cd33add118ce..c87ff16873f9 100644
--- a/drivers/platform/x86/classmate-laptop.c
+++ b/drivers/platform/x86/classmate-laptop.c
@@ -725,8 +725,10 @@ static void cmpc_tablet_handler(struct acpi_device *dev, u32 event)
725 struct input_dev *inputdev = dev_get_drvdata(&dev->dev); 725 struct input_dev *inputdev = dev_get_drvdata(&dev->dev);
726 726
727 if (event == 0x81) { 727 if (event == 0x81) {
728 if (ACPI_SUCCESS(cmpc_get_tablet(dev->handle, &val))) 728 if (ACPI_SUCCESS(cmpc_get_tablet(dev->handle, &val))) {
729 input_report_switch(inputdev, SW_TABLET_MODE, !val); 729 input_report_switch(inputdev, SW_TABLET_MODE, !val);
730 input_sync(inputdev);
731 }
730 } 732 }
731} 733}
732 734
@@ -739,8 +741,10 @@ static void cmpc_tablet_idev_init(struct input_dev *inputdev)
739 set_bit(SW_TABLET_MODE, inputdev->swbit); 741 set_bit(SW_TABLET_MODE, inputdev->swbit);
740 742
741 acpi = to_acpi_device(inputdev->dev.parent); 743 acpi = to_acpi_device(inputdev->dev.parent);
742 if (ACPI_SUCCESS(cmpc_get_tablet(acpi->handle, &val))) 744 if (ACPI_SUCCESS(cmpc_get_tablet(acpi->handle, &val))) {
743 input_report_switch(inputdev, SW_TABLET_MODE, !val); 745 input_report_switch(inputdev, SW_TABLET_MODE, !val);
746 input_sync(inputdev);
747 }
744} 748}
745 749
746static int cmpc_tablet_add(struct acpi_device *acpi) 750static int cmpc_tablet_add(struct acpi_device *acpi)
@@ -760,8 +764,10 @@ static int cmpc_tablet_resume(struct device *dev)
760 struct input_dev *inputdev = dev_get_drvdata(dev); 764 struct input_dev *inputdev = dev_get_drvdata(dev);
761 765
762 unsigned long long val = 0; 766 unsigned long long val = 0;
763 if (ACPI_SUCCESS(cmpc_get_tablet(to_acpi_device(dev)->handle, &val))) 767 if (ACPI_SUCCESS(cmpc_get_tablet(to_acpi_device(dev)->handle, &val))) {
764 input_report_switch(inputdev, SW_TABLET_MODE, !val); 768 input_report_switch(inputdev, SW_TABLET_MODE, !val);
769 input_sync(inputdev);
770 }
765 return 0; 771 return 0;
766} 772}
767#endif 773#endif