[PATCH v2 3/3] regulator: userspace-consumer: Update name

From: Naresh Solanki
Date: Wed Oct 04 2023 - 08:10:24 EST


Set name to dt node name.

Signed-off-by: Naresh Solanki <naresh.solanki@xxxxxxxxxxxxx>
---
drivers/regulator/userspace-consumer.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/regulator/userspace-consumer.c b/drivers/regulator/userspace-consumer.c
index 13c0a86ab32c..9030e1d9ce3c 100644
--- a/drivers/regulator/userspace-consumer.c
+++ b/drivers/regulator/userspace-consumer.c
@@ -159,6 +159,7 @@ static int regulator_userspace_consumer_probe(struct platform_device *pdev)
pdata = &tmpdata;
memset(pdata, 0, sizeof(*pdata));

+ pdata->name = devm_kstrdup(&pdev->dev, pdev->dev.of_node->name, GFP_KERNEL);
pdata->no_autoswitch = true;
pdata->num_supplies = get_num_supplies(pdev);

--
2.41.0