aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorLinus Walleij <[email protected]>2020-04-20 22:40:21 +0200
committerJonathan Cameron <[email protected]>2020-05-03 09:47:22 +0100
commit55ecaf1717c619edce304ba27d68c18876af6637 (patch)
tree324b95995baa42e15eefc5b78cba9634d6124aa1 /tools/perf/scripts/python
parentb67959eba404a6a1a815bf725c0f76e5bc082f06 (diff)
iio: magnetometer: ak8974: Break out measurement
This breaks out the measurement code to its own function so we can handle this without swirling it up with the big switch() statement inside ak8974_read_raw(). Keep a local s16 helper variable for the signed value coming out of the measurement before assigning it to the integer *val. The local variable makes the code easier to read and the compiler will optimize it if possible. Cc: Nick Reitemeyer <[email protected]> Cc: Stephan Gerhold <[email protected]> Reviewed-by: Michał Mirosław <[email protected]> Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions