summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartosz Golaszewski <bgolaszewski@baylibre.com>2018-09-21 15:40:11 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-09-28 15:14:54 +0200
commit226014d13fa5aa8d26caeebbd47d12ffd0a3c399 (patch)
tree509f5e720700191d71e0ff27a00557a18f71d3be
parentnvmem: sunxi_sid: use devm_nvmem_register() (diff)
downloadlinux-226014d13fa5aa8d26caeebbd47d12ffd0a3c399.tar.xz
linux-226014d13fa5aa8d26caeebbd47d12ffd0a3c399.zip
nvmem: lpc18xx_eeprom: use devm_nvmem_register()
Use the managed version of nvmem_register(). Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/nvmem/lpc18xx_eeprom.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/nvmem/lpc18xx_eeprom.c b/drivers/nvmem/lpc18xx_eeprom.c
index a9534a6e8636..b42dbaddb419 100644
--- a/drivers/nvmem/lpc18xx_eeprom.c
+++ b/drivers/nvmem/lpc18xx_eeprom.c
@@ -236,7 +236,7 @@ static int lpc18xx_eeprom_probe(struct platform_device *pdev)
lpc18xx_nvmem_config.dev = dev;
lpc18xx_nvmem_config.priv = eeprom;
- eeprom->nvmem = nvmem_register(&lpc18xx_nvmem_config);
+ eeprom->nvmem = devm_nvmem_register(dev, &lpc18xx_nvmem_config);
if (IS_ERR(eeprom->nvmem)) {
ret = PTR_ERR(eeprom->nvmem);
goto err_clk;
@@ -257,10 +257,6 @@ static int lpc18xx_eeprom_remove(struct platform_device *pdev)
struct lpc18xx_eeprom_dev *eeprom = platform_get_drvdata(pdev);
int ret;
- ret = nvmem_unregister(eeprom->nvmem);
- if (ret < 0)
- return ret;
-
clk_disable_unprepare(eeprom->clk);
return 0;