]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
staging:iio:cdc:ad7150: Refactor event parameter update
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 14 Mar 2021 18:14:50 +0000 (18:14 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 7 Apr 2021 07:36:35 +0000 (08:36 +0100)
commit0c4c4a868ab4af5886d070379b5964d1e0835c19
tree3525ff3a5ae7bd62da97093afbd23f673bd1fe76
parent1a17e7cbbffaac98ac62bf0fa5b6eb2f65fb5ade
staging:iio:cdc:ad7150: Refactor event parameter update

Original code was ordered in a fairly unituitive fashion with
the non adaptive threshold handling returning from the switch
statement, whilst the adapative path did the actual writes outside
the switch.   Make it more readable by bringing everything within
the switch statement cases and reducing scope of local variables
as appropriate.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Link: https://lore.kernel.org/r/20210314181511.531414-4-jic23@kernel.org
drivers/staging/iio/cdc/ad7150.c