2023-10-04 12:07:53

by Naresh Solanki

[permalink] [raw]
Subject: [PATCH 3/3] regulator: userspace-consumer: Update name

Set name to dt node name.

Signed-off-by: Naresh Solanki <[email protected]>
---
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