diff options
author | Hartmut Knaack <knaack.h@gmx.de> | 2015-08-28 17:59:54 -0400 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2015-10-11 10:41:36 -0400 |
commit | 847e3928de0998883219d7052cf4c049c21966e9 (patch) | |
tree | 04b8cb61cd07ee92b4ae2e1f02ba8780d3f5fd1a | |
parent | 862a76acb2a033b886880fc70db19f00a036b4aa (diff) |
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 <knaack.h@gmx.de>
Acked-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-rw-r--r-- | drivers/iio/dac/m62332.c | 2 |
1 files changed, 2 insertions, 0 deletions
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) | |||
243 | 243 | ||
244 | iio_device_unregister(indio_dev); | 244 | iio_device_unregister(indio_dev); |
245 | iio_map_array_unregister(indio_dev); | 245 | iio_map_array_unregister(indio_dev); |
246 | m62332_set_value(indio_dev, 0, 0); | ||
247 | m62332_set_value(indio_dev, 0, 1); | ||
246 | 248 | ||
247 | return 0; | 249 | return 0; |
248 | } | 250 | } |