hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/nvmem/lpc18xx_eeprom.c
....@@ -1,11 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * NXP LPC18xx/LPC43xx EEPROM memory NVMEM driver
34 *
45 * Copyright (c) 2015 Ariel D'Alessandro <ariel@vanguardiasur.com>
5
- *
6
- * This program is free software; you can redistribute it and/or modify it
7
- * under the terms of the GNU General Public License version 2 as published by
8
- * the Free Software Foundation.
96 */
107
118 #include <linux/clk.h>
....@@ -236,7 +233,7 @@
236233 lpc18xx_nvmem_config.dev = dev;
237234 lpc18xx_nvmem_config.priv = eeprom;
238235
239
- eeprom->nvmem = nvmem_register(&lpc18xx_nvmem_config);
236
+ eeprom->nvmem = devm_nvmem_register(dev, &lpc18xx_nvmem_config);
240237 if (IS_ERR(eeprom->nvmem)) {
241238 ret = PTR_ERR(eeprom->nvmem);
242239 goto err_clk;
....@@ -255,11 +252,6 @@
255252 static int lpc18xx_eeprom_remove(struct platform_device *pdev)
256253 {
257254 struct lpc18xx_eeprom_dev *eeprom = platform_get_drvdata(pdev);
258
- int ret;
259
-
260
- ret = nvmem_unregister(eeprom->nvmem);
261
- if (ret < 0)
262
- return ret;
263255
264256 clk_disable_unprepare(eeprom->clk);
265257