Commit 6188f233 authored by Thomas Weißschuh's avatar Thomas Weißschuh Committed by Greg Kroah-Hartman

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: default avatarThomas Weißschuh <linux@weissschuh.net>
Signed-off-by: default avatarSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20240705074852.423202-10-srinivas.kandagatla@linaro.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2cf7e4dc
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment