[PATCH 1/4] android/hidhost: Fix handle_uhid_output

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Data from kernel is not in form of hex string. Just copy it instead of
converting from hex string.
---
 android/hidhost.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/android/hidhost.c b/android/hidhost.c
index d45e1bd..b8d2d8f 100644
--- a/android/hidhost.c
+++ b/android/hidhost.c
@@ -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);
 
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux