All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 23/29] Revert "platform/x86: ideapad-laptop: Switch touchpad attribute to be RO"
@ 2021-02-03 21:56 Barnabás Pőcze
  0 siblings, 0 replies; only message in thread
From: Barnabás Pőcze @ 2021-02-03 21:56 UTC (permalink / raw)
  To: platform-driver-x86, Hans de Goede, Mark Gross, Ike Panhc,
	Andy Shevchenko

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.

Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>

diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c
index 0a5ca91cfe9e..4fd9670100cb 100644
--- a/drivers/platform/x86/ideapad-laptop.c
+++ b/drivers/platform/x86/ideapad-laptop.c
@@ -465,10 +465,9 @@ static ssize_t touchpad_show(struct device *dev,
 	return sysfs_emit(buf, "%d\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;
@@ -484,7 +483,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,
-- 
2.30.0



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-02-03 21:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-03 21:56 [PATCH v3 23/29] Revert "platform/x86: ideapad-laptop: Switch touchpad attribute to be RO" Barnabás Pőcze

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.