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)
commit4873586278258453bed94ffc04bfdc439197e86b
tree310c0e17610cc3b2ffd07b5081b63386fc0bac39
parent4f99de6d9d57d29b10f132490034aa21b7ba184f
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