.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * NXP LPC18xx/LPC43xx EEPROM memory NVMEM driver |
---|
3 | 4 | * |
---|
4 | 5 | * 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. |
---|
9 | 6 | */ |
---|
10 | 7 | |
---|
11 | 8 | #include <linux/clk.h> |
---|
.. | .. |
---|
236 | 233 | lpc18xx_nvmem_config.dev = dev; |
---|
237 | 234 | lpc18xx_nvmem_config.priv = eeprom; |
---|
238 | 235 | |
---|
239 | | - eeprom->nvmem = nvmem_register(&lpc18xx_nvmem_config); |
---|
| 236 | + eeprom->nvmem = devm_nvmem_register(dev, &lpc18xx_nvmem_config); |
---|
240 | 237 | if (IS_ERR(eeprom->nvmem)) { |
---|
241 | 238 | ret = PTR_ERR(eeprom->nvmem); |
---|
242 | 239 | goto err_clk; |
---|
.. | .. |
---|
255 | 252 | static int lpc18xx_eeprom_remove(struct platform_device *pdev) |
---|
256 | 253 | { |
---|
257 | 254 | 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; |
---|
263 | 255 | |
---|
264 | 256 | clk_disable_unprepare(eeprom->clk); |
---|
265 | 257 | |
---|