iio: dac: ad7303: use regulator get optional to check for ext supply
authorAlexandru Tachici <alexandru.tachici@analog.com>
Mon, 18 Nov 2019 10:58:07 +0000 (12:58 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 23 Nov 2019 14:25:02 +0000 (14:25 +0000)
commita8b26c2ddc83fab7f582405c468df2cbb9b5348a
tree5965decf989c22d98b96a70932a84c856b799399
parent3922f930de9d83fab3dcdc432ac046d79583e430
iio: dac: ad7303: use regulator get optional to check for ext supply

Previously, the code was using the of_read_property_bool() to check if
an external regulator was provided. However, this is redundant, as it's
more simple/direct to just ask the regulator is provided, via a
`devm_regulator_get_optional()` call.

Signed-off-by: Alexandru Tachici <alexandru.tachici@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/dac/ad7303.c