Input: Document no-sleep requirement for playback() callback
Subsystems (2)
PATCH 1/1 Input: Document no-sleep requirement for playback() callback
Avoids surprising users.
--- include/linux/input.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
include/linux/input.h +2 -1
@@ -475,7 +475,8 @@ extern struct class input_class;* struct ff_device - force-feedback part of an input device * @upload: Called to upload an new effect into device * @erase: Called to erase an effect from device -* @playback: Called to request device to start playing specified effect +* @playback: Called to request device to start playing specified effect. +* Must not sleep. * @set_gain: Called to set specified gain * @set_autocenter: Called to auto-center device * @destroy: called by input core when parent input device is being
Signature · 1 line
1.7.10.4
Dmitry Torokhov
maintainerQuoted 12 lines · Mark Brown
Avoids surprising users.
Signed-off-by Mark Brown <[email protected]>--- include/linux/input.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)include/linux/input.h +0
-0
include/linux/input.h extern struct class input_class; · line 482
Quoted 9 lines
include/linux/input.h +2
-1@@ -475,7 +475,8 @@ extern struct class input_class;* struct ff_device - force-feedback part of an input device * @upload: Called to upload an new effect into device * @erase: Called to erase an effect from device -* @playback: Called to request device to start playing specified effect +* @playback: Called to request device to start playing specified effect. +* Must not sleep. * @set_gain: Called to set specified gain * @set_autocenter: Called to auto-center device * @destroy: called by input core when parent input device is being
We already have a few lines below:
Quoted 3 lines
* Note that
playback(),set_gain()andset_autocenter()are called with
*dev->event_lockspinlock held and interrupts off and thus may not
* sleep.
So I doubt they will pay more attention to your addition ;)
Thanks.
Signature · 1 line
Dmitry
Quoted 7 lines · Dmitry Torokhov
We already have a few lines below:
Quoted 3 lines
* Note that
playback(),set_gain()andset_autocenter()are called with
*dev->event_lockspinlock held and interrupts off and thus may not
* sleep.So I doubt they will pay more attention to your addition ;)
Ah, it's quite a few lines below - it was actually off the bottom of my screen which rather buried the lead (though TBH I think I was most surprised by the fact that the lock isn't actually in the struct).