]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
phy: phy-snps-eusb2: fix optional phy lookup parameter
authorJohan Hovold <johan+linaro@kernel.org>
Fri, 23 May 2025 08:48:37 +0000 (10:48 +0200)
committerVinod Koul <vkoul@kernel.org>
Sun, 15 Jun 2025 16:32:41 +0000 (22:02 +0530)
The devm_of_phy_optional_get() takes an optional name argument as its
third parameter and not an index like the recently replaced
devm_of_phy_get_by_index().

Replace 0 with an explicit NULL for consistency and readability.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Abel Vesa <abel.vesa@linaro.org>
Link: https://lore.kernel.org/r/20250523084839.11015-6-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/phy-snps-eusb2.c

index 232c5e8a554f8c81237f31db27952e486e653b02..328e67ebfe03e66f04898ce4c9934c1bc64dd927 100644 (file)
@@ -581,7 +581,7 @@ static int snps_eusb2_hsphy_probe(struct platform_device *pdev)
                return dev_err_probe(dev, ret,
                                     "failed to get regulator supplies\n");
 
-       phy->repeater = devm_of_phy_optional_get(dev, np, 0);
+       phy->repeater = devm_of_phy_optional_get(dev, np, NULL);
        if (IS_ERR(phy->repeater))
                return dev_err_probe(dev, PTR_ERR(phy->repeater),
                                     "failed to get repeater\n");