From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
To: Benjamin Tissoires <benjamin.tissoires@gmail.com>,
Jiri Kosina <jkosina@suse.cz>,
David Herrmann <dh.herrmann@gmail.com>,
David Barksdale <dbarksdale@uplogix.com>,
Antonio Ospite <ao2@ao2.it>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v3 2/4] HID: cp2112: remove the last hid_output_raw_report() call
Date: Sat, 8 Mar 2014 22:52:41 -0500 [thread overview]
Message-ID: <1394337163-32478-3-git-send-email-benjamin.tissoires@redhat.com> (raw)
In-Reply-To: <1394337163-32478-1-git-send-email-benjamin.tissoires@redhat.com>
tests have shown that output reports use hid_hw_output_report().
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
---
changes in v3:
- no changes
changes in v2:
- removed FIXME
- actually use the proper calls and do not guess
drivers/hid/hid-cp2112.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/hid/hid-cp2112.c b/drivers/hid/hid-cp2112.c
index 3913eb9..56be85a 100644
--- a/drivers/hid/hid-cp2112.c
+++ b/drivers/hid/hid-cp2112.c
@@ -290,7 +290,12 @@ static int cp2112_hid_output(struct hid_device *hdev, u8 *data, size_t count,
if (!buf)
return -ENOMEM;
- ret = hdev->hid_output_raw_report(hdev, buf, count, report_type);
+ if (report_type == HID_OUTPUT_REPORT)
+ ret = hid_hw_output_report(hdev, buf, count);
+ else
+ ret = hid_hw_raw_request(hdev, buf[0], buf, count, report_type,
+ HID_REQ_SET_REPORT);
+
kfree(buf);
return ret;
}
--
1.8.5.3
next prev parent reply other threads:[~2014-03-09 3:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-09 3:52 [PATCH v3 0/4] HID: ll transport cleanup: final round Benjamin Tissoires
2014-03-09 3:52 ` [PATCH v3 1/4] HID: cp2112: remove various hid_out_raw_report calls Benjamin Tissoires
2014-03-09 3:52 ` Benjamin Tissoires [this message]
2014-03-09 3:52 ` [PATCH v3 3/4] HID: sony: do not rely on hid_output_raw_report Benjamin Tissoires
2014-03-10 11:32 ` Antonio Ospite
2014-03-10 21:49 ` Antonio Ospite
2014-03-09 3:52 ` [PATCH v3 4/4] HID: remove hid_output_raw_report transport implementations Benjamin Tissoires
2014-03-14 14:39 ` [PATCH v3 0/4] HID: ll transport cleanup: final round 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=1394337163-32478-3-git-send-email-benjamin.tissoires@redhat.com \
--to=benjamin.tissoires@redhat.com \
--cc=ao2@ao2.it \
--cc=benjamin.tissoires@gmail.com \
--cc=dbarksdale@uplogix.com \
--cc=dh.herrmann@gmail.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;
as well as URLs for NNTP newsgroup(s).