From: Jiri Kosina <jkosina@suse.cz>
To: Henrik Rydberg <rydberg@bitmath.se>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
Henrik Rydberg <rydberg@euromail.se>
Subject: Re: [PATCH] HID: hid-debug: Show rdesc for unclaimed devices
Date: Mon, 27 Aug 2012 08:07:54 -0700 (PDT) [thread overview]
Message-ID: <alpine.LNX.2.00.1208270807420.22447@pobox.suse.cz> (raw)
In-Reply-To: <1345573364-341-1-git-send-email-rydberg@euromail.se>
On Tue, 21 Aug 2012, Henrik Rydberg wrote:
> Since commit a7197c2e, the raw report descriptor is available also for
> unclaimed devices. This patchs make it show in the rdesc debugfs node.
Definitely nice to have. Applied, thanks Henrik.
>
> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
> ---
> drivers/hid/hid-debug.c | 12 +++++++++---
> 1 file changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c
> index 01dd9a7..933fff0 100644
> --- a/drivers/hid/hid-debug.c
> +++ b/drivers/hid/hid-debug.c
> @@ -911,15 +911,21 @@ static void hid_dump_input_mapping(struct hid_device *hid, struct seq_file *f)
>
> }
>
> -
> static int hid_debug_rdesc_show(struct seq_file *f, void *p)
> {
> struct hid_device *hdev = f->private;
> + const __u8 *rdesc = hdev->rdesc;
> + unsigned rsize = hdev->rsize;
> int i;
>
> + if (!rdesc) {
> + rdesc = hdev->dev_rdesc;
> + rsize = hdev->dev_rsize;
> + }
> +
> /* dump HID report descriptor */
> - for (i = 0; i < hdev->rsize; i++)
> - seq_printf(f, "%02x ", hdev->rdesc[i]);
> + for (i = 0; i < rsize; i++)
> + seq_printf(f, "%02x ", rdesc[i]);
> seq_printf(f, "\n\n");
>
> /* dump parsed data and input mappings */
> --
> 1.7.11.5
>
--
Jiri Kosina
SUSE Labs
prev parent reply other threads:[~2012-08-27 15:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-21 18:22 [PATCH] HID: hid-debug: Show rdesc for unclaimed devices Henrik Rydberg
2012-08-27 15:07 ` Jiri Kosina [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=alpine.LNX.2.00.1208270807420.22447@pobox.suse.cz \
--to=jkosina@suse.cz \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rydberg@bitmath.se \
--cc=rydberg@euromail.se \
/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;
as well as URLs for NNTP newsgroup(s).