aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorIan Abbott <[email protected]>2017-03-08 16:02:59 +0000
committerJohan Hovold <[email protected]>2017-03-13 16:55:40 +0100
commitdb9240662a44e1b7781c8dbf35631bcec7a369c6 (patch)
treeb1309bbd05ebb4bcc9288a109d24038243f107c2 /tools/perf/scripts/python/bin
parent7e1e6ceda3f07a40445ae1c4ac5549a899d5e252 (diff)
USB: serial: ftdi_sio: only allow valid latency timer values
Valid latency timer values are between 1 ms and 255 ms in 1 ms steps. The store function for the "latency_timer" device attribute currently allows any value, although only the lower 16 bits will be sent to the device, and the device only stores the lower 8 bits. The hardware appears to accept the (invalid) value 0 and treats it the same as 1 (resulting in a latency of 1 ms). Change the latency_timer_store() function to accept only the values 0 to 255, returning an error -EINVAL for out-of-range values. Call kstrtou8() to parse the integer instead of the obsolete simple_strtoul(). Signed-off-by: Ian Abbott <[email protected]> Signed-off-by: Johan Hovold <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions