linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] platform/x86: ideapad-laptop: hide unused 'touchpad_store'
@ 2017-05-22 13:07 Arnd Bergmann
  2017-05-22 17:02 ` Andy Shevchenko
  0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2017-05-22 13:07 UTC (permalink / raw)
  To: Ike Panhc, Darren Hart, Andy Shevchenko
  Cc: Arnd Bergmann, Michał Kępień, Brian Masney,
	Ritesh Raj Sarraf, Mika Westerberg, platform-driver-x86,
	linux-kernel

A readonly sysfs property must not have a 'store' function:

drivers/platform/x86/ideapad-laptop.c:438:16: error: 'touchpad_store' defined but not used [-Werror=unused-function]

We can either comment it out or remove the function entirely,
without a good reason one or or another I picked the second option.

Fixes: 7f363145992c ("platform/x86: ideapad-laptop: Switch touchpad attribute to be RO")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/platform/x86/ideapad-laptop.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c
index f7a4608cc60b..c4c7ae3179c0 100644
--- a/drivers/platform/x86/ideapad-laptop.c
+++ b/drivers/platform/x86/ideapad-laptop.c
@@ -435,6 +435,8 @@ static ssize_t touchpad_show(struct device *dev,
 	return sprintf(buf, "%lu\n", result);
 }
 
+#if 0
+/* Switch to RO for now: It might be revisited in the future */
 static ssize_t touchpad_store(struct device *dev,
 			      struct device_attribute *attr,
 			      const char *buf, size_t count)
@@ -453,7 +455,7 @@ static ssize_t touchpad_store(struct device *dev,
 	return count;
 }
 
-/* Switch to RO for now: It might be revisited in the future */
+#endif
 static DEVICE_ATTR_RO(touchpad);
 
 static struct attribute *ideapad_attributes[] = {
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-05-23 16:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-22 13:07 [PATCH] platform/x86: ideapad-laptop: hide unused 'touchpad_store' Arnd Bergmann
2017-05-22 17:02 ` Andy Shevchenko
2017-05-22 20:36   ` Arnd Bergmann
2017-05-23 16:37     ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).