[PATCH net-next 3/8] net: pse-pd: si3474: Use new mW/uA conversion helpers

From: Kory Maincent (AddSecure)

Date: Wed Dec 02 2026 - 09:09:13 EST


Now that we have helpers for the mW/uA conversion, use them in the
si3474 driver to avoid duplicating the code.

Signed-off-by: Kory Maincent (AddSecure) <kory.maincent@xxxxxxxxxxx>
---
drivers/net/pse-pd/si3474.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/net/pse-pd/si3474.c b/drivers/net/pse-pd/si3474.c
index c18df3c2ceb6e..6760d3ec1f56c 100644
--- a/drivers/net/pse-pd/si3474.c
+++ b/drivers/net/pse-pd/si3474.c
@@ -440,7 +440,6 @@ static int si3474_pi_get_actual_pw(struct pse_controller_dev *pcdev, int id)
struct si3474_priv *priv = to_si3474_priv(pcdev);
u8 chan0, chan1;
u32 uV, uA;
- u64 tmp_64;
s32 ret;

ret = si3474_pi_get_voltage(&priv->pcdev, id);
@@ -462,10 +461,7 @@ static int si3474_pi_get_actual_pw(struct pse_controller_dev *pcdev, int id)
return ret;
uA += ret;

- tmp_64 = uV;
- tmp_64 *= uA;
- /* mW = uV * uA / 1000000000 */
- return DIV_ROUND_CLOSEST_ULL(tmp_64, 1000000000);
+ return pse_to_mW(uA, uV);
}

static const struct pse_controller_ops si3474_ops = {

--
2.43.0