]> git.baikalelectronics.ru Git - kernel.git/commit
Input: iforce - use DMA-safe buffer when getting IDs from USB
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 9 Aug 2018 23:08:15 +0000 (16:08 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sun, 23 Jun 2019 06:55:20 +0000 (23:55 -0700)
commit7cae359b98fa76469fc0f5bad4aece0e07dbdf96
tree310c0e17610cc3b2ffd07b5081b63386fc0bac39
parent6e356024573db632248b71a9701db5110ec252e1
Input: iforce - use DMA-safe buffer when getting IDs from USB

When working with USB devices we need to use DMA-safe buffers,
and iforce->edata is not one. Let's rework the code to allocate
temporary buffer (iforce_get_id() is called only during initialization
so there is no reason to have permanent buffer) and use it. While at it,
let's utilize usb_control_msg() API which simplifies code.

Tested-by: Tim Schumacher <timschumi@gmx.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/joystick/iforce/iforce-usb.c