Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

phy: lynx-28g: use "dev" argument more in lynx_28g_probe()

We have "dev" which holds &pdev->dev, but we still dereference this
pointer 4 more times, instead of using the local variable.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Link: https://patch.msgid.link/20251125114847.804961-15-vladimir.oltean@nxp.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Vladimir Oltean and committed by
Vinod Koul
04dceaa3 055d08be

+4 -4
+4 -4
drivers/phy/freescale/phy-fsl-lynx-28g.c
··· 1160 1160 struct device_node *dn; 1161 1161 int err; 1162 1162 1163 - priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); 1163 + priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); 1164 1164 if (!priv) 1165 1165 return -ENOMEM; 1166 - priv->dev = &pdev->dev; 1166 + priv->dev = dev; 1167 1167 1168 1168 priv->base = devm_platform_ioremap_resource(pdev, 0); 1169 1169 if (IS_ERR(priv->base)) ··· 1216 1216 queue_delayed_work(system_power_efficient_wq, &priv->cdr_check, 1217 1217 msecs_to_jiffies(1000)); 1218 1218 1219 - dev_set_drvdata(&pdev->dev, priv); 1220 - provider = devm_of_phy_provider_register(&pdev->dev, lynx_28g_xlate); 1219 + dev_set_drvdata(dev, priv); 1220 + provider = devm_of_phy_provider_register(dev, lynx_28g_xlate); 1221 1221 1222 1222 return PTR_ERR_OR_ZERO(provider); 1223 1223 }