提交 4eeb5022 编写于 作者: M Mattia Dongili 提交者: Matthew Garrett

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=15303Signed-off-by: NMattia Dongili <malattia@linux.it>
Signed-off-by: NMatthew Garrett <mjg@redhat.com>
上级 54286fd0
......@@ -1592,8 +1592,8 @@ static struct sonypi_event sonypi_blueev[] = {
/* The set of possible wireless events */
static struct sonypi_event sonypi_wlessev[] = {
{ 0x59, SONYPI_EVENT_WIRELESS_ON },
{ 0x5a, SONYPI_EVENT_WIRELESS_OFF },
{ 0x59, SONYPI_EVENT_IGNORE },
{ 0x5a, SONYPI_EVENT_IGNORE },
{ 0, 0 }
};
......@@ -2733,6 +2733,9 @@ static irqreturn_t sony_pic_irq(int irq, void *dev_id)
if (ev == dev->event_types[i].events[j].data) {
device_event =
dev->event_types[i].events[j].event;
/* some events may require ignoring */
if (!device_event)
return IRQ_HANDLED;
goto found;
}
}
......@@ -2752,7 +2755,6 @@ static irqreturn_t sony_pic_irq(int irq, void *dev_id)
sony_laptop_report_input_event(device_event);
acpi_bus_generate_proc_event(dev->acpi_dev, 1, device_event);
sonypi_compat_report_event(device_event);
return IRQ_HANDLED;
}
......
......@@ -40,6 +40,7 @@
/* events the user application reading /dev/sonypi can use */
#define SONYPI_EVENT_IGNORE 0
#define SONYPI_EVENT_JOGDIAL_DOWN 1
#define SONYPI_EVENT_JOGDIAL_UP 2
#define SONYPI_EVENT_JOGDIAL_DOWN_PRESSED 3
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册