diff options
author | Srinivas Kandagatla <srinivas.kandagatla@linaro.org> | 2020-03-25 13:19:50 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-03-25 19:23:48 +0100 |
commit | 664f0549380cd5bee2cdac0a6ccfe21bdf74e027 (patch) | |
tree | 761815d515c3550dfdd99d15bb0edc149511cabf /drivers/nvmem/core.c | |
parent | f60442ddc40c21a99720ee990d5924c80a24728d (diff) | |
download | lwn-664f0549380cd5bee2cdac0a6ccfe21bdf74e027.tar.gz lwn-664f0549380cd5bee2cdac0a6ccfe21bdf74e027.zip |
nvmem: core: use is_bin_visible for permissions
By using is_bin_visible callback to set permissions will remove a
large list of attribute groups. These group permissions can be
dynamically derived in the callback.
Also add checks for read/write callbacks and set permissions accordingly.
Suggested-by: Greg KH <gregkh@linuxfoundation.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20200325131951.31887-2-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/nvmem/core.c')
-rw-r--r-- | drivers/nvmem/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c index 7d28e1cca4e0..477085208957 100644 --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c @@ -396,7 +396,7 @@ struct nvmem_device *nvmem_register(const struct nvmem_config *config) nvmem->read_only = device_property_present(config->dev, "read-only") || config->read_only || !nvmem->reg_write; - nvmem->dev.groups = nvmem_sysfs_get_groups(nvmem, config); + nvmem->dev.groups = nvmem_sysfs_get_groups(); dev_dbg(&nvmem->dev, "Registering nvmem device %s\n", config->name); |