1

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: Yang Yingliang <yangyingliang@huawei.com>
Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/20230810134710.114356-1-yangyingliang@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Yang Yingliang 2023-08-10 21:47:10 +08:00 committed by Greg Kroah-Hartman
parent f72ae60881
commit 8d1de0ebce
4 changed files with 0 additions and 6 deletions

View File

@ -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

View File

@ -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,

View File

@ -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[] = {

View File

@ -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[] = {