linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Input: Document no-sleep requirement for playback() callback
@ 2012-11-27  6:32 Mark Brown
  2012-11-27  6:42 ` Dmitry Torokhov
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Brown @ 2012-11-27  6:32 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-input, Mark Brown

Avoids surprising users.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 include/linux/input.h |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/linux/input.h b/include/linux/input.h
index 82ce323..0ba0de1 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -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
-- 
1.7.10.4


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

* Re: [PATCH] Input: Document no-sleep requirement for playback() callback
  2012-11-27  6:32 [PATCH] Input: Document no-sleep requirement for playback() callback Mark Brown
@ 2012-11-27  6:42 ` Dmitry Torokhov
  2012-11-27  6:47   ` Mark Brown
  0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Torokhov @ 2012-11-27  6:42 UTC (permalink / raw)
  To: Mark Brown; +Cc: linux-input

On Tue, Nov 27, 2012 at 06:32:15AM +0000, Mark Brown wrote:
> Avoids surprising users.
> 
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
>  include/linux/input.h |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/include/linux/input.h b/include/linux/input.h
> index 82ce323..0ba0de1 100644
> --- a/include/linux/input.h
> +++ b/include/linux/input.h
> @@ -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:

> * Note that playback(), set_gain() and set_autocenter() are called with
> * dev->event_lock spinlock held and interrupts off and thus may not
> * sleep.

So I doubt they will pay more attention to your addition ;)

Thanks.

-- 
Dmitry

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

* Re: [PATCH] Input: Document no-sleep requirement for playback() callback
  2012-11-27  6:42 ` Dmitry Torokhov
@ 2012-11-27  6:47   ` Mark Brown
  0 siblings, 0 replies; 3+ messages in thread
From: Mark Brown @ 2012-11-27  6:47 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-input

[-- Attachment #1: Type: text/plain, Size: 535 bytes --]

On Mon, Nov 26, 2012 at 10:42:38PM -0800, Dmitry Torokhov wrote:

> We already have a few lines below:

> > * Note that playback(), set_gain() and set_autocenter() are called with
> > * dev->event_lock spinlock 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).

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

end of thread, other threads:[~2012-11-27  6:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-27  6:32 [PATCH] Input: Document no-sleep requirement for playback() callback Mark Brown
2012-11-27  6:42 ` Dmitry Torokhov
2012-11-27  6:47   ` Mark Brown

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).