mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
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 <[email protected]> Acked-by: Daniel Baluta <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
This commit is contained in:
parent
862a76acb2
commit
847e3928de
1 changed files with 2 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue