diff options
author | Bartosz Golaszewski <bgolaszewski@baylibre.com> | 2018-09-21 16:40:03 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-09-28 16:14:53 +0300 |
commit | d7b9fd1669d4a4f38281c4e29f1408e1bdce09b3 (patch) | |
tree | b66b50195303932f05f261784e442552b5c88ed0 /include/linux/nvmem-consumer.h | |
parent | 96d08fb43e30bb55fa1a76953097cf043807837b (diff) | |
download | linux-d7b9fd1669d4a4f38281c4e29f1408e1bdce09b3.tar.xz |
nvmem: provide nvmem_dev_name()
Kernel users don't have any means of checking the names of nvmem
devices. Add a routine that returns the name of the nvmem provider.
This will be useful for future nvmem notifier subscribers - otherwise
they can't check what device is being added/removed.
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>
Diffstat (limited to 'include/linux/nvmem-consumer.h')
-rw-r--r-- | include/linux/nvmem-consumer.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/nvmem-consumer.h b/include/linux/nvmem-consumer.h index 4e85447f7860..0389fe00b177 100644 --- a/include/linux/nvmem-consumer.h +++ b/include/linux/nvmem-consumer.h @@ -55,6 +55,8 @@ ssize_t nvmem_device_cell_read(struct nvmem_device *nvmem, int nvmem_device_cell_write(struct nvmem_device *nvmem, struct nvmem_cell_info *info, void *buf); +const char *nvmem_dev_name(struct nvmem_device *nvmem); + #else static inline struct nvmem_cell *nvmem_cell_get(struct device *dev, @@ -143,6 +145,12 @@ static inline int nvmem_device_write(struct nvmem_device *nvmem, { return -ENOSYS; } + +static inline const char *nvmem_dev_name(struct nvmem_device *nvmem) +{ + return NULL; +} + #endif /* CONFIG_NVMEM */ #if IS_ENABLED(CONFIG_NVMEM) && IS_ENABLED(CONFIG_OF) |