Commit 921f70ff authored by Barnabás Pőcze's avatar Barnabás Pőcze Committed by Hans de Goede

Revert "platform/x86: ideapad-laptop: Switch touchpad attribute to be RO"

The touchpad can be enabled/disabled via this attribute on a Lenovo
Yoga 520-14IKB. Allow writing as it provides legitimate functionality.

This reverts commit 7f363145.
Signed-off-by: default avatarBarnabás Pőcze <pobrn@protonmail.com>
Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20210203215403.290792-24-pobrn@protonmail.comSigned-off-by: default avatarHans de Goede <hdegoede@redhat.com>
parent 18227424
...@@ -462,10 +462,9 @@ static ssize_t touchpad_show(struct device *dev, ...@@ -462,10 +462,9 @@ static ssize_t touchpad_show(struct device *dev,
return sysfs_emit(buf, "%d\n", !!result); return sysfs_emit(buf, "%d\n", !!result);
} }
/* Switch to RO for now: It might be revisited in the future */ static ssize_t touchpad_store(struct device *dev,
static ssize_t __maybe_unused touchpad_store(struct device *dev, struct device_attribute *attr,
struct device_attribute *attr, const char *buf, size_t count)
const char *buf, size_t count)
{ {
struct ideapad_private *priv = dev_get_drvdata(dev); struct ideapad_private *priv = dev_get_drvdata(dev);
bool state; bool state;
...@@ -481,7 +480,7 @@ static ssize_t __maybe_unused touchpad_store(struct device *dev, ...@@ -481,7 +480,7 @@ static ssize_t __maybe_unused touchpad_store(struct device *dev,
return count; return count;
} }
static DEVICE_ATTR_RO(touchpad); static DEVICE_ATTR_RW(touchpad);
static ssize_t conservation_mode_show(struct device *dev, static ssize_t conservation_mode_show(struct device *dev,
struct device_attribute *attr, struct device_attribute *attr,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment