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>
int ret;
u32 val;
+ if (!channel->phy_data->init_bus)
+ return 0;
+
rstc = devm_reset_control_array_get_shared(dev);
if (IS_ERR(rstc))
return PTR_ERR(rstc);
platform_set_drvdata(pdev, channel);
channel->dev = dev;
- if (channel->phy_data->init_bus) {
- ret = rcar_gen3_phy_usb2_init_bus(channel);
- if (ret)
- goto error;
- }
+ ret = rcar_gen3_phy_usb2_init_bus(channel);
+ if (ret)
+ goto error;
spin_lock_init(&channel->lock);
for (i = 0; i < NUM_OF_PHYS; i++) {