]> git.baikalelectronics.ru Git - kernel.git/commit
staging: iio: adis16240: Remove mutex_lock() and mutex_unlock() function call.
authorVarsha Rao <rvarsha016@gmail.com>
Tue, 14 Mar 2017 16:23:18 +0000 (21:53 +0530)
committerJonathan Cameron <jic23@kernel.org>
Sat, 18 Mar 2017 14:19:43 +0000 (14:19 +0000)
commitf1b550cc9b8e3f0c678ac2bbad370fee824fe394
tree6a17746916c360384daf2de93d71f1a9b8e8b68b
parent91565957d56ea849bf030c8ae19e2ca316cb786d
staging: iio: adis16240: Remove mutex_lock() and mutex_unlock() function call.

Remove mutex_lock() and mutex_unlock() function calls, as the
adis16240_spi_read_signed() function can be run parallel and safely
multiple times. Also remove the mutex.h header file and comment, which
are no longer required.

As indio_dev is declared and initialized in adis16240_spi_read_signed(),
again declaration to same type and initialization to same value is not
required, remove it from adis16240_read_12bit_signed().

Simplify the return logic, by merging assignment and return into a single
line.

Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/staging/iio/accel/adis16240.c