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>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/4] HID: cp2112: remove various hid_out_raw_report calls
Date: Fri, 28 Feb 2014 19:20:34 -0500 [thread overview]
Message-ID: <1393633237-26496-2-git-send-email-benjamin.tissoires@redhat.com> (raw)
In-Reply-To: <1393633237-26496-1-git-send-email-benjamin.tissoires@redhat.com>
hid_out_raw_report is going to be obsoleted as it is not part of the
unified HID low level transport documentation
(Documentation/hid/hid-transport.txt)
hid_output_raw_report(hdev, buf, sizeof(buf), HID_FEATURE_REPORT);
is strictly equivalent to:
hid_hw_raw_request(hdev, buf[0], buf, sizeof(buf),
HID_FEATURE_REPORT, HID_REQ_SET_REPORT);
So use the new api.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
---
drivers/hid/hid-cp2112.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/hid/hid-cp2112.c b/drivers/hid/hid-cp2112.c
index 1025982..860db694 100644
--- a/drivers/hid/hid-cp2112.c
+++ b/drivers/hid/hid-cp2112.c
@@ -185,8 +185,8 @@ static int cp2112_gpio_direction_input(struct gpio_chip *chip, unsigned offset)
buf[1] &= ~(1 << offset);
buf[2] = gpio_push_pull;
- ret = hdev->hid_output_raw_report(hdev, buf, sizeof(buf),
- HID_FEATURE_REPORT);
+ ret = hid_hw_raw_request(hdev, buf[0], buf, sizeof(buf),
+ HID_FEATURE_REPORT, HID_REQ_SET_REPORT);
if (ret < 0) {
hid_err(hdev, "error setting GPIO config: %d\n", ret);
return ret;
@@ -207,8 +207,8 @@ static void cp2112_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
buf[1] = value ? 0xff : 0;
buf[2] = 1 << offset;
- ret = hdev->hid_output_raw_report(hdev, buf, sizeof(buf),
- HID_FEATURE_REPORT);
+ ret = hid_hw_raw_request(hdev, buf[0], buf, sizeof(buf),
+ HID_FEATURE_REPORT, HID_REQ_SET_REPORT);
if (ret < 0)
hid_err(hdev, "error setting GPIO values: %d\n", ret);
}
@@ -253,8 +253,8 @@ static int cp2112_gpio_direction_output(struct gpio_chip *chip,
buf[1] |= 1 << offset;
buf[2] = gpio_push_pull;
- ret = hdev->hid_output_raw_report(hdev, buf, sizeof(buf),
- HID_FEATURE_REPORT);
+ ret = hid_hw_raw_request(hdev, buf[0], buf, sizeof(buf),
+ HID_FEATURE_REPORT, HID_REQ_SET_REPORT);
if (ret < 0) {
hid_err(hdev, "error setting GPIO config: %d\n", ret);
return ret;
--
1.8.5.3
next prev parent reply other threads:[~2014-03-01 0:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-01 0:20 [PATCH 0/4] HID: ll transport cleanup: final round Benjamin Tissoires
2014-03-01 0:20 ` Benjamin Tissoires [this message]
2014-03-01 0:20 ` [PATCH 2/4] HID: cp2112: remove the last hid_output_raw_report() call Benjamin Tissoires
2014-03-04 13:46 ` Jiri Kosina
2014-03-04 14:18 ` Benjamin Tissoires
2014-03-04 14:21 ` Jiri Kosina
[not found] ` <ba12abe9-5f40-4351-8dc0-76008931fc0d@email.android.com>
2014-03-05 21:09 ` Benjamin Tissoires
2014-03-01 0:20 ` [PATCH 3/4] HID: sony: do not rely on hid_output_raw_report Benjamin Tissoires
2014-03-01 12:16 ` Antonio Ospite
2014-03-03 14:28 ` Benjamin Tissoires
2014-03-01 0:20 ` [PATCH 4/4] HID: remove hid_output_raw_report transport implementations Benjamin Tissoires
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=1393633237-26496-2-git-send-email-benjamin.tissoires@redhat.com \
--to=benjamin.tissoires@redhat.com \
--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).