diff options
author | Guenter Roeck <linux@roeck-us.net> | 2016-06-02 12:05:12 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-10-07 15:21:18 +0200 |
commit | 45492799fc315414b7ec803d0f7bc63c4948ea80 (patch) | |
tree | ad03c3a749b9d407268c45844acfe4169c8bc862 /include | |
parent | b7ee4c9ae074f3316e697cbed6706eced21e016d (diff) | |
download | lwn-45492799fc315414b7ec803d0f7bc63c4948ea80.tar.gz lwn-45492799fc315414b7ec803d0f7bc63c4948ea80.zip |
nvmem: Declare nvmem_cell_read() consistently
commit a6c50912508d80164a5e607993b617be85a46d73 upstream.
nvmem_cell_read() is declared as void * if CONFIG_NVMEM is enabled, and
as char * otherwise. This can result in a build warning if CONFIG_NVMEM
is not enabled and a caller asigns the result to a type other than char *
without using a typecast. Use a consistent declaration to avoid the
problem.
Fixes: e2a5402ec7c6 ("nvmem: Add nvmem_device based consumer apis.")
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/nvmem-consumer.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/nvmem-consumer.h b/include/linux/nvmem-consumer.h index 9bb77d3ed6e0..c2256d746543 100644 --- a/include/linux/nvmem-consumer.h +++ b/include/linux/nvmem-consumer.h @@ -74,7 +74,7 @@ static inline void nvmem_cell_put(struct nvmem_cell *cell) { } -static inline char *nvmem_cell_read(struct nvmem_cell *cell, size_t *len) +static inline void *nvmem_cell_read(struct nvmem_cell *cell, size_t *len) { return ERR_PTR(-ENOSYS); } |