Skip to content

Commit 79d9db7

Browse files
claudiubezneavinodkoul
authored andcommitted
phy: renesas: rcar-gen3-usb2: Move phy_data->init_bus check
Move the check of phy_data->init_bus from rcar_gen3_phy_usb2_init_bus() to rcar_gen3_phy_usb2_probe() to avoid having it duplicated in both the probe path and the upcoming resume code. This is a preparatory patch. Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patch.msgid.link/20251119120418.686224-2-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
1 parent 662bb17 commit 79d9db7

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

drivers/phy/renesas/phy-rcar-gen3-usb2.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -782,6 +782,9 @@ static int rcar_gen3_phy_usb2_init_bus(struct rcar_gen3_chan *channel)
782782
int ret;
783783
u32 val;
784784

785+
if (!channel->phy_data->init_bus)
786+
return 0;
787+
785788
rstc = devm_reset_control_array_get_shared(dev);
786789
if (IS_ERR(rstc))
787790
return PTR_ERR(rstc);
@@ -861,11 +864,9 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev)
861864
platform_set_drvdata(pdev, channel);
862865
channel->dev = dev;
863866

864-
if (channel->phy_data->init_bus) {
865-
ret = rcar_gen3_phy_usb2_init_bus(channel);
866-
if (ret)
867-
goto error;
868-
}
867+
ret = rcar_gen3_phy_usb2_init_bus(channel);
868+
if (ret)
869+
goto error;
869870

870871
spin_lock_init(&channel->lock);
871872
for (i = 0; i < NUM_OF_PHYS; i++) {

0 commit comments

Comments
 (0)