Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Thomas Weißschuh and committed by
Greg Kroah-Hartman
6188f233 2cf7e4dc

+1 -6
+1 -6
drivers/nvmem/core.c
··· 367 367 NULL, 368 368 }; 369 369 370 - static const struct attribute_group *nvmem_cells_groups[] = { 371 - &nvmem_cells_group, 372 - NULL, 373 - }; 374 - 375 370 static struct bin_attribute bin_attr_nvmem_eeprom_compat = { 376 371 .attr = { 377 372 .name = "eeprom", ··· 473 478 474 479 nvmem_cells_group.bin_attrs = cells_attrs; 475 480 476 - ret = device_add_groups(&nvmem->dev, nvmem_cells_groups); 481 + ret = device_add_group(&nvmem->dev, &nvmem_cells_group); 477 482 if (ret) 478 483 goto unlock_mutex; 479 484