Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sony-laptop: ignore hard switch rfkill events (SPIC)

There is not much use for these events in userspace and handling the
events themselves seems to get in the way of the actual activation of
the rf devices. The SNC device doesn't expose them already.
https://bugzilla.kernel.org/show_bug.cgi?id=15303

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Matthew Garrett <mjg@redhat.com>

authored by

Mattia Dongili and committed by
Matthew Garrett
4eeb5022 54286fd0

+6 -3
+5 -3
drivers/platform/x86/sony-laptop.c
··· 1592 1592 1593 1593 /* The set of possible wireless events */ 1594 1594 static struct sonypi_event sonypi_wlessev[] = { 1595 - { 0x59, SONYPI_EVENT_WIRELESS_ON }, 1596 - { 0x5a, SONYPI_EVENT_WIRELESS_OFF }, 1595 + { 0x59, SONYPI_EVENT_IGNORE }, 1596 + { 0x5a, SONYPI_EVENT_IGNORE }, 1597 1597 { 0, 0 } 1598 1598 }; 1599 1599 ··· 2733 2733 if (ev == dev->event_types[i].events[j].data) { 2734 2734 device_event = 2735 2735 dev->event_types[i].events[j].event; 2736 + /* some events may require ignoring */ 2737 + if (!device_event) 2738 + return IRQ_HANDLED; 2736 2739 goto found; 2737 2740 } 2738 2741 } ··· 2755 2752 sony_laptop_report_input_event(device_event); 2756 2753 acpi_bus_generate_proc_event(dev->acpi_dev, 1, device_event); 2757 2754 sonypi_compat_report_event(device_event); 2758 - 2759 2755 return IRQ_HANDLED; 2760 2756 } 2761 2757
+1
include/linux/sonypi.h
··· 40 40 41 41 /* events the user application reading /dev/sonypi can use */ 42 42 43 + #define SONYPI_EVENT_IGNORE 0 43 44 #define SONYPI_EVENT_JOGDIAL_DOWN 1 44 45 #define SONYPI_EVENT_JOGDIAL_UP 2 45 46 #define SONYPI_EVENT_JOGDIAL_DOWN_PRESSED 3