# Re: \[PATCH 07/12\] HID: wiimote: Add output queue for wiimote driver

- From: Dmitry Torokhov \<dmitry.torokhov@gmail.com\>
- Date: 2011-06-28 04:51:29 
- List: linux-input
- Page: https://ratatoskr.run/linux-input/2011/06/8917086
- Thread: https://ratatoskr.run/linux-input/2011/06/8917072/t.md

```text


avid Herrmann [ref] wrote:

>The raw hid output function that is supported by bluetooth low-level
>hid driver does not provide an output queue and also may sleep. The
>wiimote driver, though, may need to send data in atomic context so
>this patch adds a buffered output queue for the wiimote driver.
>
>We use the shared workqueue to send our buffer to the hid device.
>There is always only one active worker which reschedules itself until
>the wiimote queue is empty. This prevents the worker from occupying
>the shared workqueue for too long. 

With CWQ this is not a concern anymore, you should be able to flush your buffer at once.
-- 
Dmitry
```
