summaryrefslogtreecommitdiff
path: root/drivers/platform/x86/asus-wmi.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2023-11-20 16:42:34 +0100
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2023-11-23 14:24:17 +0200
commit6db829fa2f1295aaad51a3c00f6fc57a27c444bb (patch)
tree1048a2e0a8bcc6f78ef2c342f336d7a271a00ee8 /drivers/platform/x86/asus-wmi.c
parentb52cbca22cbf6c9d2700c1e576d0ddcc670e49d5 (diff)
downloadlwn-6db829fa2f1295aaad51a3c00f6fc57a27c444bb.tar.gz
lwn-6db829fa2f1295aaad51a3c00f6fc57a27c444bb.zip
platform/x86: asus-wmi: Change q500a_i8042_filter() into a generic i8042-filter
Change asus_q500a_i8042_filter() into a generic i8042-filter, using a new filter_i8042_e1_extended_codes flag in the quirks struct to decide if e1 extended codes should be filtered out or not. This is a preparation patch for adding support for filtering volume key events being reported twice through both the PS/2 keyboard and asus-wmi. Note while modifying the code also drop the unnecessary unlikely() annotations, this is not in a hot path so those are not necessary. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20231120154235.610808-3-hdegoede@redhat.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Diffstat (limited to 'drivers/platform/x86/asus-wmi.c')
-rw-r--r--drivers/platform/x86/asus-wmi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index 53e25cb467d7..ca668cf04020 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -4567,8 +4567,8 @@ static int asus_wmi_add(struct platform_device *pdev)
goto fail_wmi_handler;
}
- if (asus->driver->quirks->i8042_filter) {
- err = i8042_install_filter(asus->driver->quirks->i8042_filter);
+ if (asus->driver->i8042_filter) {
+ err = i8042_install_filter(asus->driver->i8042_filter);
if (err)
pr_warn("Unable to install key filter - %d\n", err);
}
@@ -4609,8 +4609,8 @@ static int asus_wmi_remove(struct platform_device *device)
struct asus_wmi *asus;
asus = platform_get_drvdata(device);
- if (asus->driver->quirks->i8042_filter)
- i8042_remove_filter(asus->driver->quirks->i8042_filter);
+ if (asus->driver->i8042_filter)
+ i8042_remove_filter(asus->driver->i8042_filter);
wmi_remove_notify_handler(asus->driver->event_guid);
asus_wmi_backlight_exit(asus);
asus_screenpad_exit(asus);