mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-12-26 20:33:46 +08:00
android/hidhost: Fix handle_uhid_output
Data from kernel is not in form of hex string. Just copy it instead of converting from hex string.
This commit is contained in:
parent
cdfdc6b2b6
commit
4a0ac907ca
@ -180,13 +180,13 @@ static void handle_uhid_output(struct hid_device *dev,
|
||||
if (!(dev->ctrl_io))
|
||||
return;
|
||||
|
||||
req_size = 1 + (output->size / 2);
|
||||
req_size = 1 + output->size;
|
||||
req = g_try_malloc0(req_size);
|
||||
if (!req)
|
||||
return;
|
||||
|
||||
req[0] = HID_MSG_SET_REPORT | output->rtype;
|
||||
hex2buf(output->data, req + 1, req_size - 1);
|
||||
memcpy(req + 1, output->data, req_size - 1);
|
||||
|
||||
fd = g_io_channel_unix_get_fd(dev->ctrl_io);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user