mirror of
https://github.com/fail0verflow/switch-linux.git
synced 2025-05-04 02:34:21 -04:00
nvmem: Declare nvmem_cell_read() consistently
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: e2a5402ec7
("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>
This commit is contained in:
parent
deb319705e
commit
a6c5091250
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
return ERR_PTR(-ENOSYS);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue