mirror of
https://github.com/torvalds/linux.git
synced 2026-06-06 13:37:36 +02:00
nvmem: core: set size for sysfs bin file
[ Upstream commit 8619225103 ]
For some reason we never set the size for nvmem sysfs binary file.
Set this.
Reported-by: Gilles BULOZ <gilles.buloz@kontron.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20211130133909.6154-1-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
4a273a94bd
commit
2e2086f49e
|
|
@ -222,6 +222,8 @@ static umode_t nvmem_bin_attr_is_visible(struct kobject *kobj,
|
||||||
struct device *dev = kobj_to_dev(kobj);
|
struct device *dev = kobj_to_dev(kobj);
|
||||||
struct nvmem_device *nvmem = to_nvmem_device(dev);
|
struct nvmem_device *nvmem = to_nvmem_device(dev);
|
||||||
|
|
||||||
|
attr->size = nvmem->size;
|
||||||
|
|
||||||
return nvmem_bin_attr_get_umode(nvmem);
|
return nvmem_bin_attr_get_umode(nvmem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user