Skip to contentSkip to conversation

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

PATCH Superseded Barnabás Pőcze 1 participant 1 message Dec 16, 2020 x86 platform drivers

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 18/24 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 7f363145992cebf4ea760447f1cfdf6f81459683.

drivers/platform/x86/ideapad-laptop.c +4 -5
index f5a1d7041aab..fda49c236190 100644
@@ -442,10 +442,9 @@ static ssize_t touchpad_show(struct device *dev,
 	return sysfs_emit(buf, "%lu\n", result);
 }
 
-/* Switch to RO for now: It might be revisited in the future */
-static ssize_t __maybe_unused touchpad_store(struct device *dev,
-					     struct device_attribute *attr,
-					     const char *buf, size_t count)
+static ssize_t touchpad_store(struct device *dev,
+			      struct device_attribute *attr,
+			      const char *buf, size_t count)
 {
 	struct ideapad_private *priv = dev_get_drvdata(dev);
 	bool state;
@@ -461,7 +460,7 @@ static ssize_t __maybe_unused touchpad_store(struct device *dev,
 	return count;
 }
 
-static DEVICE_ATTR_RO(touchpad);
+static DEVICE_ATTR_RW(touchpad);
 
 static ssize_t conservation_mode_show(struct device *dev,
 				struct device_attribute *attr,
Signature · 1 line
2.29.2