diff options
author | Bartosz Golaszewski <bgolaszewski@baylibre.com> | 2018-09-21 06:40:02 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-09-28 15:14:53 +0200 |
commit | 96d08fb43e30bb55fa1a76953097cf043807837b (patch) | |
tree | 928ec97c7d2a9b2f723f5cbdbdfa0e5a5ae82c42 | |
parent | c853d6904f1428c081de5367da2569933556a668 (diff) | |
download | linux-96d08fb43e30bb55fa1a76953097cf043807837b.tar.bz2 |
eeprom: at25: use devm_nvmem_register()
Use the resource managed variant 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/misc/eeprom/at25.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/misc/eeprom/at25.c b/drivers/misc/eeprom/at25.c index 840afb398f9e..d874df72853f 100644 --- a/drivers/misc/eeprom/at25.c +++ b/drivers/misc/eeprom/at25.c @@ -366,7 +366,7 @@ static int at25_probe(struct spi_device *spi) at25->nvmem_config.word_size = 1; at25->nvmem_config.size = chip.byte_len; - at25->nvmem = nvmem_register(&at25->nvmem_config); + at25->nvmem = devm_nvmem_register(&spi->dev, &at25->nvmem_config); if (IS_ERR(at25->nvmem)) return PTR_ERR(at25->nvmem); @@ -384,7 +384,6 @@ static int at25_remove(struct spi_device *spi) struct at25_data *at25; at25 = spi_get_drvdata(spi); - nvmem_unregister(at25->nvmem); return 0; } |