From: Hartmut Knaack Date: Fri, 28 Aug 2015 21:59:54 +0000 (+0200) Subject: iio:dac:m62332: shutdown on remove X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=847e3928de0998883219d7052cf4c049c21966e9;p=openwrt%2Fstaging%2Fblogic.git iio:dac:m62332: shutdown on remove The regulator framework requests to balance regulator_enable() calls with regulator_disable() calls. To meet this requirement, set channels to 0 on remove, which implies a regulator_disable() call in case that channel was enabled. Signed-off-by: Hartmut Knaack Acked-by: Daniel Baluta Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/dac/m62332.c b/drivers/iio/dac/m62332.c index cffc0630ed32..c61720de8606 100644 --- a/drivers/iio/dac/m62332.c +++ b/drivers/iio/dac/m62332.c @@ -243,6 +243,8 @@ static int m62332_remove(struct i2c_client *client) iio_device_unregister(indio_dev); iio_map_array_unregister(indio_dev); + m62332_set_value(indio_dev, 0, 0); + m62332_set_value(indio_dev, 0, 1); return 0; }