1 From 190fae468592bc2f0efc8b928920f8f712b5831e Mon Sep 17 00:00:00 2001
2 From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
3 Date: Sun, 20 Feb 2022 15:15:15 +0000
4 Subject: [PATCH] nvmem: core: Remove unused devm_nvmem_unregister()
6 There are no users and seems no will come of the devm_nvmem_unregister().
7 Remove the function and remove the unused devm_nvmem_match() along with it.
9 Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
10 Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
11 Link: https://lore.kernel.org/r/20220220151527.17216-2-srinivas.kandagatla@linaro.org
12 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
14 drivers/nvmem/core.c | 22 ----------------------
15 include/linux/nvmem-provider.h | 8 --------
16 2 files changed, 30 deletions(-)
18 --- a/drivers/nvmem/core.c
19 +++ b/drivers/nvmem/core.c
20 @@ -940,28 +940,6 @@ struct nvmem_device *devm_nvmem_register
22 EXPORT_SYMBOL_GPL(devm_nvmem_register);
24 -static int devm_nvmem_match(struct device *dev, void *res, void *data)
26 - struct nvmem_device **r = res;
32 - * devm_nvmem_unregister() - Unregister previously registered managed nvmem
35 - * @dev: Device that uses the nvmem device.
36 - * @nvmem: Pointer to previously registered nvmem device.
38 - * Return: Will be negative on error or zero on success.
40 -int devm_nvmem_unregister(struct device *dev, struct nvmem_device *nvmem)
42 - return devres_release(dev, devm_nvmem_release, devm_nvmem_match, nvmem);
44 -EXPORT_SYMBOL(devm_nvmem_unregister);
46 static struct nvmem_device *__nvmem_device_get(void *data,
47 int (*match)(struct device *dev, const void *data))
49 --- a/include/linux/nvmem-provider.h
50 +++ b/include/linux/nvmem-provider.h
51 @@ -133,8 +133,6 @@ void nvmem_unregister(struct nvmem_devic
52 struct nvmem_device *devm_nvmem_register(struct device *dev,
53 const struct nvmem_config *cfg);
55 -int devm_nvmem_unregister(struct device *dev, struct nvmem_device *nvmem);
57 void nvmem_add_cell_table(struct nvmem_cell_table *table);
58 void nvmem_del_cell_table(struct nvmem_cell_table *table);
60 @@ -153,12 +151,6 @@ devm_nvmem_register(struct device *dev,
61 return nvmem_register(c);
65 -devm_nvmem_unregister(struct device *dev, struct nvmem_device *nvmem)
70 static inline void nvmem_add_cell_table(struct nvmem_cell_table *table) {}
71 static inline void nvmem_del_cell_table(struct nvmem_cell_table *table) {}