]> git.baikalelectronics.ru Git - kernel.git/commit
staging: iio: isl29028: remove nested if statements
authorBrian Masney <masneyb@onstation.org>
Sun, 4 Dec 2016 02:19:25 +0000 (21:19 -0500)
committerJonathan Cameron <jic23@kernel.org>
Sun, 4 Dec 2016 11:01:10 +0000 (11:01 +0000)
commit9ce543325d6c2bf34a5b93613daeaa8b902e13fb
treeb2b97a897a678753fd4da85578a3e178d57b7cb2
parent3fae04414f55bbc8aa6f40a770e4374d4c187e63
staging: iio: isl29028: remove nested if statements

There are two callers to the function isl29028_set_als_ir_mode() and
both instances use a nested if statement to only change the chip state
if it is not in the proper mode. This patch moves this check into the
isl29028_set_als_ir_mode() function to remove the nested if
statements.

Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/staging/iio/light/isl29028.c