[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <2024032745-recycling-state-4c32@gregkh>
Date: Wed, 27 Mar 2024 09:11:46 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: srinivas.kandagatla@...aro.org
Cc: linux-kernel@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: [PATCH] nvmem: core: switch to use device_add_groups()
devm_device_add_groups() is being removed from the kernel, so move the
nvmem driver to use device_add_groups() instead. The logic is
identical, when the device is removed the driver core will properly
clean up and remove the groups, and the memory used by the attribute
groups will be freed because it was created with dev_* calls, so this is
functionally identical overall.
Cc: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/nvmem/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c
index 2c6b99402df8..e1ec3b7200d7 100644
--- a/drivers/nvmem/core.c
+++ b/drivers/nvmem/core.c
@@ -478,7 +478,7 @@ static int nvmem_populate_sysfs_cells(struct nvmem_device *nvmem)
nvmem_cells_group.bin_attrs = cells_attrs;
- ret = devm_device_add_groups(&nvmem->dev, nvmem_cells_groups);
+ ret = device_add_groups(&nvmem->dev, nvmem_cells_groups);
if (ret)
goto unlock_mutex;
--
2.44.0
Powered by blists - more mailing lists