diff options
author | Thomas Weißschuh <linux@weissschuh.net> | 2024-07-05 08:48:46 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-07-05 09:55:04 +0200 |
commit | 6188f233161c6a5b2d1c396a221dfafc77dc9eec (patch) | |
tree | 719c98f92313d382f111334cd490b14be1ef5afa /drivers/nvmem | |
parent | 2cf7e4dcfb3bbd3fcea5d8918e294b9855ab639b (diff) |
nvmem: core: add single sysfs group
The sysfs core provides a function to easily register a single group.
Use it and remove the now unnecessary nvmem_cells_groups array.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20240705074852.423202-10-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/nvmem')
-rw-r--r-- | drivers/nvmem/core.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c index e1ec3b7200d7..96e76d88204c 100644 --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c @@ -367,11 +367,6 @@ static const struct attribute_group *nvmem_dev_groups[] = { NULL, }; -static const struct attribute_group *nvmem_cells_groups[] = { - &nvmem_cells_group, - NULL, -}; - static struct bin_attribute bin_attr_nvmem_eeprom_compat = { .attr = { .name = "eeprom", @@ -478,7 +473,7 @@ static int nvmem_populate_sysfs_cells(struct nvmem_device *nvmem) nvmem_cells_group.bin_attrs = cells_attrs; - ret = device_add_groups(&nvmem->dev, nvmem_cells_groups); + ret = device_add_group(&nvmem->dev, &nvmem_cells_group); if (ret) goto unlock_mutex; |