[PATCH net-next 2/5] net: phy: mediatek: Move LED helper functions into mtk phy lib
Andrew Lunn
andrew at lunn.ch
Wed Oct 30 14:46:47 PDT 2024
> +void mtk_phy_leds_state_init(struct phy_device *phydev)
> +{
> + int i;
> +
> + for (i = 0; i < 2; ++i)
> + phydev->drv->led_hw_control_get(phydev, i, NULL);
> +}
This does appear to be the same as what it is replacing, but it also
seems odd.
Why is an init function doing a get? I assume it is to do with setting
priv->led_state? But led_state is not used in setting *rules, which is
what led_hw_control_get() is all about. So maybe in a follow up patch,
move the actual init code out of led_hw_control_get()?
Reviewed-by: Andrew Lunn <andrew at lunn.ch>
Andrew
More information about the linux-arm-kernel
mailing list