iio: imx7d_adc: Simplify imx7d_adc_probe() with imx7d_adc_resume()
authorAndrey Smirnov <andrew.smirnov@gmail.com>
Sun, 14 Apr 2019 18:35:02 +0000 (11:35 -0700)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 22 Apr 2019 10:34:14 +0000 (11:34 +0100)
commit4fe86cdf927a3883fcc4bd2573a4131e3129abbc
tree41d32e1833a2cab4f3853ff3524e745def30a5ab
parent49deef1b1a385a8faccb222da4474bea073f5040
iio: imx7d_adc: Simplify imx7d_adc_probe() with imx7d_adc_resume()

Initialization sequence performed in imx7d_adc_resume() is exactly the
same as the one being done in imx7d_adc_probe(). Make use of the
former in the latter to avoid code duplication. Rename
imx7d_adc_resume() to imx7d_adc_enable() for clarity while at it.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Cc: Jonathan Cameron <jic23@kernel.org>
Cc: Hartmut Knaack <knaack.h@gmx.de>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Cc: Chris Healy <cphealy@gmail.com>
Cc: linux-iio@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/imx7d_adc.c