summaryrefslogtreecommitdiff
path: root/include/linux/serio.h
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2021-07-20 00:34:40 +0300
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2021-07-20 00:35:21 +0300
commit81c7c0a350bfe9306ad9fb10356534ede8f4ab31 (patch)
tree871f0848bcb473ea2a25c04f7e6ae5b90615f769 /include/linux/serio.h
parent9aa75914e5fcb39e79fc6de9e44cd12943732c38 (diff)
downloadlinux-81c7c0a350bfe9306ad9fb10356534ede8f4ab31.tar.xz
Input: serio - make write method mandatory
Given that all serio drivers except one implement write() method let's make it mandatory to avoid testing for its presence whenever we attempt to use it. Link: https://lore.kernel.org/r/YFgUxG/TljMuVeQ3@google.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'include/linux/serio.h')
-rw-r--r--include/linux/serio.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/include/linux/serio.h b/include/linux/serio.h
index 6c27d413da92..075f1b8d76fa 100644
--- a/include/linux/serio.h
+++ b/include/linux/serio.h
@@ -121,10 +121,7 @@ void serio_unregister_driver(struct serio_driver *drv);
static inline int serio_write(struct serio *serio, unsigned char data)
{
- if (serio->write)
- return serio->write(serio, data);
- else
- return -1;
+ return serio->write(serio, data);
}
static inline void serio_drv_write_wakeup(struct serio *serio)