diff options
author | Marco Felsch <m.felsch@pengutronix.de> | 2021-01-18 21:55:25 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-01-19 11:06:30 +0100 |
commit | 1ba2b002a50cc4985f1a3a5afc4837023c73dab4 (patch) | |
tree | 1d98114130e0cc9b7bca380083dd8ea8c4909b3d /include | |
parent | b5d3c4c00dff9211fb271e644ae5e98aa0a0853e (diff) | |
download | barebox-1ba2b002a50cc4985f1a3a5afc4837023c73dab4.tar.gz barebox-1ba2b002a50cc4985f1a3a5afc4837023c73dab4.tar.xz |
nvmem: sync stub return values with linux code
Based on linux commit:
8<------------------------------------------------------------------------
commit 20167b70c894f20cd01e2579fad206de440816ef
Author: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Date: Fri Sep 21 06:40:22 2018 -0700
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>
8<------------------------------------------------------------------------
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/nvmem-consumer.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/linux/nvmem-consumer.h b/include/linux/nvmem-consumer.h index 9e0fd4265e..2f79014c0f 100644 --- a/include/linux/nvmem-consumer.h +++ b/include/linux/nvmem-consumer.h @@ -50,7 +50,7 @@ int nvmem_device_cell_write(struct nvmem_device *nvmem, static inline struct nvmem_cell *nvmem_cell_get(struct device_d *dev, const char *name) { - return ERR_PTR(-ENOSYS); + return ERR_PTR(-EOPNOTSUPP); } static inline void nvmem_cell_put(struct nvmem_cell *cell) @@ -59,26 +59,26 @@ static inline void nvmem_cell_put(struct nvmem_cell *cell) static inline char *nvmem_cell_read(struct nvmem_cell *cell, size_t *len) { - return ERR_PTR(-ENOSYS); + return ERR_PTR(-EOPNOTSUPP); } static inline void *nvmem_cell_get_and_read(struct device_node *np, const char *cell_name, size_t bytes) { - return ERR_PTR(-ENOSYS); + return ERR_PTR(-EOPNOTSUPP); } static inline int nvmem_cell_write(struct nvmem_cell *cell, const char *buf, size_t len) { - return -ENOSYS; + return -EOPNOTSUPP; } static inline struct nvmem_device *nvmem_device_get(struct device_d *dev, const char *name) { - return ERR_PTR(-ENOSYS); + return ERR_PTR(-EOPNOTSUPP); } static inline void nvmem_device_put(struct nvmem_device *nvmem) |