mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
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>
This commit is contained in:
parent
96d08fb43e
commit
d7b9fd1669
2 changed files with 21 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue