[PATCH v4 phy 02/16] phy: lynx-28g: refactor lane probing to lynx_28g_probe_lane()
Vinod Koul
vkoul at kernel.org
Thu Nov 13 08:49:55 PST 2025
On 10-11-25, 11:22, Vladimir Oltean wrote:
> This simplifies the main control flow a little bit and makes the logic
> reusable for probing the lanes with OF nodes if those exist.
>
> Cc: Rob Herring <robh at kernel.org>
> Cc: Krzysztof Kozlowski <krzk+dt at kernel.org>
> Cc: Conor Dooley <conor+dt at kernel.org>
> Cc: devicetree at vger.kernel.org
> Cc: stable at vger.kernel.org
> Signed-off-by: Vladimir Oltean <vladimir.oltean at nxp.com>
> ---
> v3->v4:
> - patch is new, broken out from previous "[PATCH v3 phy 13/17] phy:
> lynx-28g: probe on per-SoC and per-instance compatible strings" to
> deal only with lane OF nodes, in a backportable way
>
> drivers/phy/freescale/phy-fsl-lynx-28g.c | 42 +++++++++++++++---------
> 1 file changed, 26 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/phy/freescale/phy-fsl-lynx-28g.c b/drivers/phy/freescale/phy-fsl-lynx-28g.c
> index c20d2636c5e9..901240bbcade 100644
> --- a/drivers/phy/freescale/phy-fsl-lynx-28g.c
> +++ b/drivers/phy/freescale/phy-fsl-lynx-28g.c
> @@ -579,12 +579,33 @@ static struct phy *lynx_28g_xlate(struct device *dev,
> return priv->lane[idx].phy;
> }
>
> +static int lynx_28g_probe_lane(struct lynx_28g_priv *priv, int id,
> + struct device_node *dn)
> +{
> + struct lynx_28g_lane *lane = &priv->lane[id];
> + struct phy *phy;
> +
> + memset(lane, 0, sizeof(*lane));
priv is kzalloc, so why memset here?
--
~Vinod
More information about the linux-phy
mailing list