summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/wm8770.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2019-02-26 16:22:47 +0000
committerMark Brown <broonie@kernel.org>2019-02-26 16:22:47 +0000
commit3146089d235b304e665dc551472ae9cb9ab58572 (patch)
treed1a9141c302f269cb8468f0d4de78124ea5e389a /sound/soc/codecs/wm8770.c
parentb5e806ae4ad81de66c334d3d333fa42f960fbbd1 (diff)
parent7b6b0049e2b70d103adf1b7d0320802f70ddceca (diff)
Merge branch 'asoc-5.1' into asoc-next
Diffstat (limited to 'sound/soc/codecs/wm8770.c')
-rw-r--r--sound/soc/codecs/wm8770.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/sound/soc/codecs/wm8770.c b/sound/soc/codecs/wm8770.c
index 806245c70f8b..37467c512597 100644
--- a/sound/soc/codecs/wm8770.c
+++ b/sound/soc/codecs/wm8770.c
@@ -666,8 +666,9 @@ static int wm8770_spi_probe(struct spi_device *spi)
/* This should really be moved into the regulator core */
for (i = 0; i < ARRAY_SIZE(wm8770->supplies); i++) {
- ret = regulator_register_notifier(wm8770->supplies[i].consumer,
- &wm8770->disable_nb[i]);
+ ret = devm_regulator_register_notifier(
+ wm8770->supplies[i].consumer,
+ &wm8770->disable_nb[i]);
if (ret) {
dev_err(&spi->dev,
"Failed to register regulator notifier: %d\n",
@@ -687,25 +688,12 @@ static int wm8770_spi_probe(struct spi_device *spi)
return ret;
}
-static int wm8770_spi_remove(struct spi_device *spi)
-{
- struct wm8770_priv *wm8770 = spi_get_drvdata(spi);
- int i;
-
- for (i = 0; i < ARRAY_SIZE(wm8770->supplies); ++i)
- regulator_unregister_notifier(wm8770->supplies[i].consumer,
- &wm8770->disable_nb[i]);
-
- return 0;
-}
-
static struct spi_driver wm8770_spi_driver = {
.driver = {
.name = "wm8770",
.of_match_table = wm8770_of_match,
},
.probe = wm8770_spi_probe,
- .remove = wm8770_spi_remove
};
module_spi_driver(wm8770_spi_driver);