Commit 8d1de0eb authored by Yang Yingliang's avatar Yang Yingliang Committed by Greg Kroah-Hartman
Browse files

usb: dwc3: remove unnecessary platform_set_drvdata()



Remove unnecessary platform_set_drvdata(..., NULL) in ->remove(),
the driver_data will be cleared in device_unbind_cleanup() after
calling ->remove() in driver call code.

Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Acked-by: default avatarThinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/20230810134710.114356-1-yangyingliang@huawei.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f72ae608
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -292,8 +292,6 @@ static void dwc3_ti_remove(struct platform_device *pdev)
	clk_disable_unprepare(am62->usb2_refclk);
	pm_runtime_disable(dev);
	pm_runtime_set_suspended(dev);

	platform_set_drvdata(pdev, NULL);
}

#ifdef CONFIG_PM
+0 −1
Original line number Diff line number Diff line
@@ -280,7 +280,6 @@ static void dwc3_imx8mp_remove(struct platform_device *pdev)

	pm_runtime_disable(dev);
	pm_runtime_put_noidle(dev);
	platform_set_drvdata(pdev, NULL);
}

static int __maybe_unused dwc3_imx8mp_suspend(struct dwc3_imx8mp *dwc3_imx,
+0 −2
Original line number Diff line number Diff line
@@ -197,8 +197,6 @@ static void kdwc3_remove(struct platform_device *pdev)
	phy_power_off(kdwc->usb3_phy);
	phy_exit(kdwc->usb3_phy);
	phy_pm_runtime_put_sync(kdwc->usb3_phy);

	platform_set_drvdata(pdev, NULL);
}

static const struct of_device_id kdwc3_of_match[] = {
+0 −1
Original line number Diff line number Diff line
@@ -519,7 +519,6 @@ static void dwc3_octeon_remove(struct platform_device *pdev)
	struct dwc3_octeon *octeon = platform_get_drvdata(pdev);

	of_platform_depopulate(octeon->dev);
	platform_set_drvdata(pdev, NULL);
}

static const struct of_device_id dwc3_octeon_of_match[] = {