ca5357c8d9886ebb59561e073ede12d777501b3c
[librecmc/librecmc.git] /
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()
5
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.
8
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>
13 ---
14  drivers/nvmem/core.c           | 22 ----------------------
15  include/linux/nvmem-provider.h |  8 --------
16  2 files changed, 30 deletions(-)
17
18 --- a/drivers/nvmem/core.c
19 +++ b/drivers/nvmem/core.c
20 @@ -943,28 +943,6 @@ struct nvmem_device *devm_nvmem_register
21  }
22  EXPORT_SYMBOL_GPL(devm_nvmem_register);
23  
24 -static int devm_nvmem_match(struct device *dev, void *res, void *data)
25 -{
26 -       struct nvmem_device **r = res;
27 -
28 -       return *r == data;
29 -}
30 -
31 -/**
32 - * devm_nvmem_unregister() - Unregister previously registered managed nvmem
33 - * device.
34 - *
35 - * @dev: Device that uses the nvmem device.
36 - * @nvmem: Pointer to previously registered nvmem device.
37 - *
38 - * Return: Will be negative on error or zero on success.
39 - */
40 -int devm_nvmem_unregister(struct device *dev, struct nvmem_device *nvmem)
41 -{
42 -       return devres_release(dev, devm_nvmem_release, devm_nvmem_match, nvmem);
43 -}
44 -EXPORT_SYMBOL(devm_nvmem_unregister);
45 -
46  static struct nvmem_device *__nvmem_device_get(void *data,
47                         int (*match)(struct device *dev, const void *data))
48  {
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);
54  
55 -int devm_nvmem_unregister(struct device *dev, struct nvmem_device *nvmem);
56 -
57  void nvmem_add_cell_table(struct nvmem_cell_table *table);
58  void nvmem_del_cell_table(struct nvmem_cell_table *table);
59  
60 @@ -153,12 +151,6 @@ devm_nvmem_register(struct device *dev,
61         return nvmem_register(c);
62  }
63  
64 -static inline int
65 -devm_nvmem_unregister(struct device *dev, struct nvmem_device *nvmem)
66 -{
67 -       return -EOPNOTSUPP;
68 -}
69 -
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) {}
72