diff options
| author | Dmitry Torokhov <[email protected]> | 2021-07-20 21:48:35 -0700 |
|---|---|---|
| committer | Dmitry Torokhov <[email protected]> | 2021-07-20 21:48:35 -0700 |
| commit | 7d3370e506ec5cd781ef6b938cf29c046eb77585 (patch) | |
| tree | f52d548b7b8896b750540a224424427ce54373cb /include/linux | |
| parent | 133b6558c75566bf692460fd1a09b3b795ef2c1a (diff) | |
Revert "Input: serio - make write method mandatory"
This reverts commit 81c7c0a350bfe9306ad9fb10356534ede8f4ab31. The idea
to make write method mandatory was flawed as several client drivers
(such as atkbd) check for presence of write() method to adjust behavior
of the driver.
Reported-by: Nathan Chancellor <[email protected]>
Reported-by: Michael Kelley <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/serio.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/serio.h b/include/linux/serio.h index 075f1b8d76fa..6c27d413da92 100644 --- a/include/linux/serio.h +++ b/include/linux/serio.h @@ -121,7 +121,10 @@ void serio_unregister_driver(struct serio_driver *drv); static inline int serio_write(struct serio *serio, unsigned char data) { - return serio->write(serio, data); + if (serio->write) + return serio->write(serio, data); + else + return -1; } static inline void serio_drv_write_wakeup(struct serio *serio) |