[PATCH net-next 10/12] net: pse-pd: Register regulator even for undescribed PSE PIs

Kory Maincent
2024-10-02T16:29:14Z

From: Kory Maincent (Dent Project) <kory.maincent@bootlin.com>

Ensure that regulators are registered for all PSE PIs, even those not
explicitly described in the device tree. This change lays the
groundwork for future support of regulator notifiers. Maintaining
consistent ordering between the PSE PIs regulator table and the
regulator notifier table will prevent added complexity in future
implementations.

Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
---
drivers/net/pse-pd/pse_core.c | 4 ----
1 file changed, 4 deletions(-)

diff --git a/drivers/net/pse-pd/pse_core.c b/drivers/net/pse-pd/pse_core.c
index 6b3893a3381c..d365fb7c8a98 100644
--- a/drivers/net/pse-pd/pse_core.c
+++ b/drivers/net/pse-pd/pse_core.c
@@ -463,10 +463,6 @@ int pse_controller_register(struct pse_controller_dev *pcdev)
for (i = 0; i < pcdev->nr_lines; i++) {
char *reg_name;

- /* Do not register regulator for PIs not described */
- if (!pcdev->no_of_pse_pi && !pcdev->pi[i].np)
- continue;
-
reg_name = devm_kzalloc(pcdev->dev, reg_name_len, GFP_KERNEL);
if (!reg_name)
return -ENOMEM;

--
2.34.1