Commit 226014d1 authored by Bartosz Golaszewski's avatar Bartosz Golaszewski Committed by Greg Kroah-Hartman

nvmem: lpc18xx_eeprom: use devm_nvmem_register()

Use the managed version of nvmem_register().
Signed-off-by: default avatarBartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: default avatarSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6eed8dd9
...@@ -236,7 +236,7 @@ static int lpc18xx_eeprom_probe(struct platform_device *pdev) ...@@ -236,7 +236,7 @@ static int lpc18xx_eeprom_probe(struct platform_device *pdev)
lpc18xx_nvmem_config.dev = dev; lpc18xx_nvmem_config.dev = dev;
lpc18xx_nvmem_config.priv = eeprom; 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)) { if (IS_ERR(eeprom->nvmem)) {
ret = PTR_ERR(eeprom->nvmem); ret = PTR_ERR(eeprom->nvmem);
goto err_clk; goto err_clk;
...@@ -257,10 +257,6 @@ static int lpc18xx_eeprom_remove(struct platform_device *pdev) ...@@ -257,10 +257,6 @@ static int lpc18xx_eeprom_remove(struct platform_device *pdev)
struct lpc18xx_eeprom_dev *eeprom = platform_get_drvdata(pdev); struct lpc18xx_eeprom_dev *eeprom = platform_get_drvdata(pdev);
int ret; int ret;
ret = nvmem_unregister(eeprom->nvmem);
if (ret < 0)
return ret;
clk_disable_unprepare(eeprom->clk); clk_disable_unprepare(eeprom->clk);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment