diff options
author | Srinivas Kandagatla <srinivas.kandagatla@linaro.org> | 2021-11-30 16:39:09 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-12-03 18:03:37 +0300 |
commit | 86192251033308bb42f1e9813c962989d8ed07ec (patch) | |
tree | e78844498cd512882c5d2bf8dee886cddee78643 /drivers | |
parent | 33dc3e3e99e626ce51f462d883b05856c6c30b1d (diff) | |
download | linux-86192251033308bb42f1e9813c962989d8ed07ec.tar.xz |
nvmem: core: set size for sysfs bin file
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/nvmem/core.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c index e765d3d0542e..23a38dcf0fc4 100644 --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c @@ -312,6 +312,8 @@ static umode_t nvmem_bin_attr_is_visible(struct kobject *kobj, struct device *dev = kobj_to_dev(kobj); struct nvmem_device *nvmem = to_nvmem_device(dev); + attr->size = nvmem->size; + return nvmem_bin_attr_get_umode(nvmem); } |