staging: iio: ad7780: check if ad778x before gain update
authorGiuliano Belinassi <giuliano.belinassi@gmail.com>
Thu, 8 Nov 2018 13:03:20 +0000 (11:03 -0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Fri, 16 Nov 2018 18:32:17 +0000 (18:32 +0000)
commit23da6a15113e97043d37b2ac83d234cd43dc627b
tree9116385d7f3a94636f1b45987f86c2ed734db8ed
parent72e3a5248da9046d17aec9366976a3ec45ceeb3c
staging: iio: ad7780: check if ad778x before gain update

Only the ad778x have the 'gain' status bit. Check it before updating
through a new variable is_ad778x in chip_info.

Signed-off-by: Giuliano Belinassi <giuliano.belinassi@usp.br>
Acked-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/staging/iio/adc/ad7780.c