From: Szymon Janc <szymon.janc@tieto.com>
To: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 1/4] android/hidhost: Fix handle_uhid_output
Date: Wed, 23 Apr 2014 10:13:18 +0200 [thread overview]
Message-ID: <2072826.HgskM1hZWJ@leonov> (raw)
In-Reply-To: <1397828406-29951-1-git-send-email-szymon.janc@tieto.com>
On Friday 18 of April 2014 15:40:03 Szymon Janc wrote:
> 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);
Pushed.
--
BR
Szymon Janc
prev parent reply other threads:[~2014-04-23 8:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-18 13:40 [PATCH 1/4] android/hidhost: Fix handle_uhid_output Szymon Janc
2014-04-18 13:40 ` [PATCH 2/4] android/hidhost: Cleanup handle_uhid_output Szymon Janc
2014-04-18 13:40 ` [PATCH 3/4] android/hidhost: Don't use sscanf in hex2buf Szymon Janc
2014-04-18 13:40 ` [PATCH 4/4] android/hidhost: Check if hex2buf succed Szymon Janc
2014-04-23 8:13 ` Szymon Janc [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2072826.HgskM1hZWJ@leonov \
--to=szymon.janc@tieto.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox