diff options
author | David Herrmann <dh.herrmann@googlemail.com> | 2011-07-05 15:45:14 +0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2011-07-11 16:30:23 +0400 |
commit | 23c063cb02b69244bbc215cb81c2cad0208fbecf (patch) | |
tree | 0fdf0243e91640dc3e072790a16f61f351d7e3ad /include/scsi/osd_protocol.h | |
parent | 0c218f14487fd67e60059458c48b43cc3d36b96e (diff) | |
download | linux-23c063cb02b69244bbc215cb81c2cad0208fbecf.tar.xz |
HID: wiimote: Add output queue for wiimote driver
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 flushes the whole output
queue to the device. If our queue is full, every further
output is discarded.
Special care is needed in the deinitialization routine. When
wiimote_hid_remove is called, HID input is already disabled, but HID
output may still be used from our worker and is then discarded by the
lower HID layers. Therefore, we can safely disable the input layer since it
is the only layer that still sends input events.
Future sysfs attributes must be freed before unregistering input to
avoid the sysfs handlers to send input events to a non-existing input
layer.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'include/scsi/osd_protocol.h')
0 files changed, 0 insertions, 0 deletions