From: Barnabás Pőcze Date: Wed, 3 Feb 2021 21:57:01 +0000 (+0000) Subject: platform/x86: ideapad-laptop: send notification about touchpad state change to sysfs X-Git-Tag: v5.12-rc1~123^2~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c67957464e1e4934588d2672ef6189f5d790fb67;p=thirdparty%2Fkernel%2Flinux.git platform/x86: ideapad-laptop: send notification about touchpad state change to sysfs Consumers can determine if the value of an attribute changed much more easily if changes are broadcast using sysfs_notify(), so utilize it. Signed-off-by: Barnabás Pőcze Reviewed-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210203215403.290792-26-pobrn@protonmail.com Signed-off-by: Hans de Goede --- diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c index 90fb071ccbc0b..18f920c298091 100644 --- a/drivers/platform/x86/ideapad-laptop.c +++ b/drivers/platform/x86/ideapad-laptop.c @@ -1221,6 +1221,7 @@ static void ideapad_sync_touchpad_state(struct ideapad_private *priv) */ i8042_command(¶m, value ? I8042_CMD_AUX_ENABLE : I8042_CMD_AUX_DISABLE); ideapad_input_report(priv, value ? 67 : 66); + sysfs_notify(&priv->platform_device->dev.kobj, NULL, "touchpad"); } }