OSDN Git Service

iio: adc: max1027: Simplify the _set_trigger_state() helper
authorMiquel Raynal <miquel.raynal@bootlin.com>
Tue, 21 Sep 2021 11:53:59 +0000 (13:53 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 19 Oct 2021 07:27:33 +0000 (08:27 +0100)
commitc5a396298248238e4530e9351719b93b94e5b009
treead5c59bdfb9ce6c4dea8140d0e172d8caa49c233
parenteaf57d50c675eb52bae6531e336a31677fd028de
iio: adc: max1027: Simplify the _set_trigger_state() helper

The call to max1027_enable_trigger() is the same in both cases thanks to
the 'state' variable, so factorize a little bit to simplify the code and
explain why we call this helper.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/r/20210921115408.66711-8-miquel.raynal@bootlin.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/max1027.c