lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240620-nvmem-compat-name-v1-3-700e17ba3d8f@weissschuh.net>
Date: Thu, 20 Jun 2024 18:00:35 +0200
From: Thomas Weißschuh <linux@...ssschuh.net>
To: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>, 
 Jiri Prchal <jiri.prchal@...ignal.cz>
Cc: linux-kernel@...r.kernel.org, 
 Greg Kroah-Hartman <gregkh@...uxfoundation.org>, 
 Thomas Weißschuh <linux@...ssschuh.net>
Subject: [PATCH 3/5] 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@...ssschuh.net>
---
 drivers/nvmem/core.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c
index d74297d10631..4c250f0e55ef 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 const struct bin_attribute bin_attr_nvmem_eeprom_compat = {
 	.attr	= {
 		.name	= "eeprom",
@@ -477,7 +472,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;
 

-- 
2.45.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ