diff options
author | Bartosz Golaszewski <bgolaszewski@baylibre.com> | 2018-09-21 16:40:22 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-09-28 16:14:55 +0300 |
commit | 20167b70c894f20cd01e2579fad206de440816ef (patch) | |
tree | 466e7e0f68f91bef8dd6ebb57eab3388a8f2e0dc /include/linux/nvmem-provider.h | |
parent | 165589f0cb52b34db12e15676a034b8f83dfa756 (diff) | |
download | linux-20167b70c894f20cd01e2579fad206de440816ef.tar.xz |
nvmem: use EOPNOTSUPP instead of ENOSYS
Checkpatch emits warnings when using ENOSYS. Some of the frameworks
started using EOPNOTSUPP as return values for API functions when given
subsystem is disabled in Kconfig.
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-provider.h')
-rw-r--r-- | include/linux/nvmem-provider.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/include/linux/nvmem-provider.h b/include/linux/nvmem-provider.h index 8ae012f6545a..1e3283c2af77 100644 --- a/include/linux/nvmem-provider.h +++ b/include/linux/nvmem-provider.h @@ -100,7 +100,7 @@ void nvmem_del_cell_table(struct nvmem_cell_table *table); static inline struct nvmem_device *nvmem_register(const struct nvmem_config *c) { - return ERR_PTR(-ENOSYS); + return ERR_PTR(-EOPNOTSUPP); } static inline void nvmem_unregister(struct nvmem_device *nvmem) {} @@ -114,8 +114,7 @@ devm_nvmem_register(struct device *dev, const struct nvmem_config *c) static inline int devm_nvmem_unregister(struct device *dev, struct nvmem_device *nvmem) { - return -ENOSYS; - + return -EOPNOTSUPP; } static inline void nvmem_add_cell_table(struct nvmem_cell_table *table) {} |