]> git.ipfire.org Git - thirdparty/linux.git/blobdiff - drivers/phy/freescale/phy-fsl-lynx-28g.c
phy: lynx-28g: cancel the CDR check work item on the remove path
[thirdparty/linux.git] / drivers / phy / freescale / phy-fsl-lynx-28g.c
index 4f036c77284e1d2255bf7796bd45927ecbe63895..c6323669f11921bb7e961fca544137db151a3449 100644 (file)
@@ -604,6 +604,14 @@ static int lynx_28g_probe(struct platform_device *pdev)
        return PTR_ERR_OR_ZERO(provider);
 }
 
+static void lynx_28g_remove(struct platform_device *pdev)
+{
+       struct device *dev = &pdev->dev;
+       struct lynx_28g_priv *priv = dev_get_drvdata(dev);
+
+       cancel_delayed_work_sync(&priv->cdr_check);
+}
+
 static const struct of_device_id lynx_28g_of_match_table[] = {
        { .compatible = "fsl,lynx-28g" },
        { },
@@ -612,6 +620,7 @@ MODULE_DEVICE_TABLE(of, lynx_28g_of_match_table);
 
 static struct platform_driver lynx_28g_driver = {
        .probe  = lynx_28g_probe,
+       .remove_new = lynx_28g_remove,
        .driver = {
                .name = "lynx-28g",
                .of_match_table = lynx_28g_of_match_table,