Skip to content

Commit

Permalink
Documentation: USB: fix example bulk-message timeout
Browse files Browse the repository at this point in the history
USB bulk-message timeouts are specified in milliseconds and should
specifically not vary with CONFIG_HZ.

Use a fixed five-second timeout in the "Writing USB Device Drivers"
example.

Signed-off-by: Johan Hovold <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
jhovold authored and gregkh committed Oct 26, 2021
1 parent e8d6336 commit ebcf652
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Documentation/driver-api/usb/writing_usb_driver.rst
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ error message. This can be shown with the following code::
skel->bulk_in_endpointAddr),
skel->bulk_in_buffer,
skel->bulk_in_size,
&count, HZ*10);
&count, 5000);
/* if the read was successful, copy the data to user space */
if (!retval) {
if (copy_to_user (buffer, skel->bulk_in_buffer, count))
Expand Down

0 comments on commit ebcf652

Please sign in to comment.