From: David Herrmann <dh.herrmann@gmail.com>
To: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cc: Benjamin Tissoires <benjamin.tissoires@gmail.com>,
Jiri Kosina <jkosina@suse.cz>,
"open list:HID CORE LAYER" <linux-input@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 08/14] HID: logitech-dj: remove hid_output_raw_report call
Date: Wed, 12 Feb 2014 11:36:29 +0100 [thread overview]
Message-ID: <CANq1E4SGSca-BBebO7yXfbAwjeRMfizbsw9PD-HmmL755ULvrQ@mail.gmail.com> (raw)
In-Reply-To: <1392055139-19631-9-git-send-email-benjamin.tissoires@redhat.com>
Hi
On Mon, Feb 10, 2014 at 6:58 PM, Benjamin Tissoires
<benjamin.tissoires@redhat.com> wrote:
> hid-input do not use anymore hid_output_raw_report() to set the LEDs.
> Use the correct implementation now and make them working again.
Looks good.
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Thanks
David
> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
> ---
> drivers/hid/hid-logitech-dj.c | 21 ++++++---------------
> 1 file changed, 6 insertions(+), 15 deletions(-)
>
> diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c
> index 980ede5..486dbde 100644
> --- a/drivers/hid/hid-logitech-dj.c
> +++ b/drivers/hid/hid-logitech-dj.c
> @@ -193,9 +193,6 @@ static const u8 hid_reportid_size_map[NUMBER_OF_HID_REPORTS] = {
>
> static struct hid_ll_driver logi_dj_ll_driver;
>
> -static int logi_dj_output_hidraw_report(struct hid_device *hid, u8 * buf,
> - size_t count,
> - unsigned char report_type);
> static int logi_dj_recv_query_paired_devices(struct dj_receiver_dev *djrcv_dev);
>
> static void logi_dj_recv_destroy_djhid_device(struct dj_receiver_dev *djrcv_dev,
> @@ -262,7 +259,6 @@ static void logi_dj_recv_add_djhid_device(struct dj_receiver_dev *djrcv_dev,
> }
>
> dj_hiddev->ll_driver = &logi_dj_ll_driver;
> - dj_hiddev->hid_output_raw_report = logi_dj_output_hidraw_report;
>
> dj_hiddev->dev.parent = &djrcv_hdev->dev;
> dj_hiddev->bus = BUS_USB;
> @@ -544,9 +540,10 @@ static void logi_dj_ll_close(struct hid_device *hid)
> dbg_hid("%s:%s\n", __func__, hid->phys);
> }
>
> -static int logi_dj_output_hidraw_report(struct hid_device *hid, u8 * buf,
> - size_t count,
> - unsigned char report_type)
> +static int logi_dj_ll_raw_request(struct hid_device *hid,
> + unsigned char reportnum, __u8 *buf,
> + size_t count, unsigned char report_type,
> + int reqtype)
> {
> struct dj_device *djdev = hid->driver_data;
> struct dj_receiver_dev *djrcv_dev = djdev->dj_receiver_dev;
> @@ -567,15 +564,8 @@ static int logi_dj_output_hidraw_report(struct hid_device *hid, u8 * buf,
> out_buf[1] = djdev->device_index;
> memcpy(out_buf + 2, buf, count);
>
> - /*
> - * hid-generic calls us with hid_output_raw_report(), but the LEDs
> - * are set through a SET_REPORT command. It works for USB-HID devices
> - * because usbhid either calls a SET_REPORT or directly send the output
> - * report depending if the device presents an urbout.
> - * Let be simple, send a SET_REPORT request.
> - */
> ret = hid_hw_raw_request(djrcv_dev->hdev, out_buf[0], out_buf,
> - DJREPORT_SHORT_LENGTH, report_type, HID_REQ_SET_REPORT);
> + DJREPORT_SHORT_LENGTH, report_type, reqtype);
>
> kfree(out_buf);
> return ret;
> @@ -662,6 +652,7 @@ static struct hid_ll_driver logi_dj_ll_driver = {
> .stop = logi_dj_ll_stop,
> .open = logi_dj_ll_open,
> .close = logi_dj_ll_close,
> + .raw_request = logi_dj_ll_raw_request,
> };
>
>
> --
> 1.8.3.1
>
next prev parent reply other threads:[~2014-02-12 10:36 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-10 17:58 [PATCH 00/14] HID: low-level transport cleanup, round 2 Benjamin Tissoires
2014-02-10 17:58 ` [PATCH 01/14] HID: uHID: remove duplicated code Benjamin Tissoires
2014-02-12 10:17 ` David Herrmann
2014-02-10 17:58 ` [PATCH 02/14] HID: uHID: implement .raw_request Benjamin Tissoires
2014-02-12 10:18 ` David Herrmann
2014-02-10 17:58 ` [PATCH 03/14] HID: core: implement generic .request() Benjamin Tissoires
2014-02-12 10:25 ` David Herrmann
2014-02-13 15:21 ` Benjamin Tissoires
2014-02-16 16:43 ` David Herrmann
2014-02-10 17:58 ` [PATCH 04/14] HID: i2c-hid: implement ll_driver transport-layer callbacks Benjamin Tissoires
2014-02-12 10:29 ` David Herrmann
2014-02-10 17:58 ` [PATCH 05/14] HID: i2c-hid: use generic .request() implementation Benjamin Tissoires
2014-02-12 10:30 ` David Herrmann
2014-02-13 15:14 ` Benjamin Tissoires
2014-02-10 17:58 ` [PATCH 06/14] HID: usbhid: change return error of usbhid_output_report Benjamin Tissoires
2014-02-12 10:31 ` David Herrmann
2014-02-10 17:58 ` [PATCH 07/14] HID: input: hid-input remove hid_output_raw_report call Benjamin Tissoires
2014-02-12 10:35 ` David Herrmann
2014-02-13 15:38 ` Benjamin Tissoires
2014-02-10 17:58 ` [PATCH 08/14] HID: logitech-dj: " Benjamin Tissoires
2014-02-12 10:36 ` David Herrmann [this message]
2014-02-10 17:58 ` [PATCH 09/14] HID: replace hid_output_raw_report with hid_hw_raw_request for feature requests Benjamin Tissoires
2014-02-10 17:58 ` [PATCH 10/14] HID: wiimote: replace hid_output_raw_report with hid_hw_output_report for output requests Benjamin Tissoires
2014-02-12 10:39 ` David Herrmann
2014-02-10 17:58 ` [PATCH 11/14] HID: sony: remove hid_output_raw_report calls Benjamin Tissoires
2014-02-12 10:47 ` David Herrmann
2014-02-13 15:46 ` Benjamin Tissoires
2014-02-10 17:58 ` [PATCH 12/14] HID: hidraw: replace hid_output_raw_report() calls by appropriates ones Benjamin Tissoires
2014-02-12 10:49 ` David Herrmann
2014-02-13 15:16 ` Benjamin Tissoires
2014-02-10 17:58 ` [PATCH 13/14] HID: remove hid_output_raw_report Benjamin Tissoires
2014-02-12 10:50 ` David Herrmann
2014-02-10 17:58 ` [PATCH 14/14] HID: core: check parameters when sending/receiving data from the device Benjamin Tissoires
2014-02-12 10:51 ` David Herrmann
2014-02-17 14:01 ` [PATCH 00/14] HID: low-level transport cleanup, round 2 Jiri Kosina
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=CANq1E4SGSca-BBebO7yXfbAwjeRMfizbsw9PD-HmmL755ULvrQ@mail.gmail.com \
--to=dh.herrmann@gmail.com \
--cc=benjamin.tissoires@gmail.com \
--cc=benjamin.tissoires@redhat.com \
--cc=jkosina@suse.cz \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®