Skip to content

Commit 6188f23

Browse files
t-8chgregkh
authored andcommitted
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 <[email protected]> Signed-off-by: Srinivas Kandagatla <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 2cf7e4d commit 6188f23

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

drivers/nvmem/core.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -367,11 +367,6 @@ static const struct attribute_group *nvmem_dev_groups[] = {
367367
NULL,
368368
};
369369

370-
static const struct attribute_group *nvmem_cells_groups[] = {
371-
&nvmem_cells_group,
372-
NULL,
373-
};
374-
375370
static struct bin_attribute bin_attr_nvmem_eeprom_compat = {
376371
.attr = {
377372
.name = "eeprom",
@@ -478,7 +473,7 @@ static int nvmem_populate_sysfs_cells(struct nvmem_device *nvmem)
478473

479474
nvmem_cells_group.bin_attrs = cells_attrs;
480475

481-
ret = device_add_groups(&nvmem->dev, nvmem_cells_groups);
476+
ret = device_add_group(&nvmem->dev, &nvmem_cells_group);
482477
if (ret)
483478
goto unlock_mutex;
484479

0 commit comments

Comments
 (0)