aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/nvmem-provider.h
diff options
context:
space:
mode:
authorBartosz Golaszewski <bgolaszewski@baylibre.com>2018-09-21 06:40:22 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-09-28 15:14:55 +0200
commit20167b70c894f20cd01e2579fad206de440816ef (patch)
tree466e7e0f68f91bef8dd6ebb57eab3388a8f2e0dc /include/linux/nvmem-provider.h
parentnvmem: make the naming of arguments in nvmem_cell_get() consistent (diff)
downloadwireguard-linux-20167b70c894f20cd01e2579fad206de440816ef.tar.xz
wireguard-linux-20167b70c894f20cd01e2579fad206de440816ef.zip
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.h5
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) {}