Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
d605e922
Commit
d605e922
authored
Jun 11, 2003
by
Sergey Vlasov
Committed by
Vojtech Pavlik
Jun 11, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hid: fix HID feature/output report writing to devices. This should
fix most problems with UPS shutdown.
parent
edc01f56
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
drivers/usb/input/hid-core.c
drivers/usb/input/hid-core.c
+6
-2
No files found.
drivers/usb/input/hid-core.c
View file @
d605e922
...
...
@@ -957,6 +957,10 @@ static void hid_output_field(struct hid_field *field, __u8 *data)
void
hid_output_report
(
struct
hid_report
*
report
,
__u8
*
data
)
{
unsigned
n
;
if
(
report
->
id
>
0
)
*
data
++
=
report
->
id
;
for
(
n
=
0
;
n
<
report
->
maxfield
;
n
++
)
hid_output_field
(
report
->
field
[
n
],
data
);
}
...
...
@@ -1051,7 +1055,7 @@ static int hid_submit_out(struct hid_device *hid)
report
=
hid
->
out
[
hid
->
outtail
];
hid_output_report
(
report
,
hid
->
outbuf
);
hid
->
urbout
->
transfer_buffer_length
=
((
report
->
size
-
1
)
>>
3
)
+
1
;
hid
->
urbout
->
transfer_buffer_length
=
((
report
->
size
-
1
)
>>
3
)
+
1
+
(
report
->
id
>
0
)
;
hid
->
urbout
->
dev
=
hid
->
dev
;
dbg
(
"submitting out urb"
);
...
...
@@ -1075,7 +1079,7 @@ static int hid_submit_ctrl(struct hid_device *hid)
if
(
dir
==
USB_DIR_OUT
)
hid_output_report
(
report
,
hid
->
ctrlbuf
);
hid
->
urbctrl
->
transfer_buffer_length
=
((
report
->
size
-
1
)
>>
3
)
+
1
+
(
(
report
->
id
>
0
)
&&
(
dir
!=
USB_DIR_OUT
)
);
hid
->
urbctrl
->
transfer_buffer_length
=
((
report
->
size
-
1
)
>>
3
)
+
1
+
(
report
->
id
>
0
);
hid
->
urbctrl
->
pipe
=
(
dir
==
USB_DIR_OUT
)
?
usb_sndctrlpipe
(
hid
->
dev
,
0
)
:
usb_rcvctrlpipe
(
hid
->
dev
,
0
);
hid
->
urbctrl
->
dev
=
hid
->
dev
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment