diff options
author | Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> | 2019-02-08 16:45:20 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-02-08 19:18:49 +0300 |
commit | 0bb423f2eaafedf89715c482a543dcd629ba3946 (patch) | |
tree | 87a45e601cda565f0c66fb46012c9409f7fc16a9 /sound/soc/codecs/max9860.c | |
parent | 510135535382db7f5ee8727818172e42c9c9cbd5 (diff) | |
download | linux-0bb423f2eaafedf89715c482a543dcd629ba3946.tar.xz |
ASoC: regulator notifier registration should be managed
Regulator notifiers, that were registered during codec driver probing,
must be unregistered during driver release, or device managed versions
have to be used. This patch fixes codec drivers, that weren't explicitly
unregistering notifiers and simplifies those, that did that manually.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/max9860.c')
-rw-r--r-- | sound/soc/codecs/max9860.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/soc/codecs/max9860.c b/sound/soc/codecs/max9860.c index de3d44e9199b..8be636fe6552 100644 --- a/sound/soc/codecs/max9860.c +++ b/sound/soc/codecs/max9860.c @@ -615,7 +615,8 @@ static int max9860_probe(struct i2c_client *i2c) max9860->dvddio_nb.notifier_call = max9860_dvddio_event; - ret = regulator_register_notifier(max9860->dvddio, &max9860->dvddio_nb); + ret = devm_regulator_register_notifier(max9860->dvddio, + &max9860->dvddio_nb); if (ret) dev_err(dev, "Failed to register DVDDIO notifier: %d\n", ret); |