--- zzzz-none-000/linux-3.10.107/drivers/clk/clk-twl6040.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/clk/clk-twl6040.c 2021-02-04 17:41:59.000000000 +0000 @@ -20,7 +20,6 @@ * */ -#include #include #include #include @@ -91,20 +90,11 @@ clkdata->twl6040 = twl6040; clkdata->mcpdm_fclk.init = &wm831x_clkout_init; - clkdata->clk = clk_register(&pdev->dev, &clkdata->mcpdm_fclk); + clkdata->clk = devm_clk_register(&pdev->dev, &clkdata->mcpdm_fclk); if (IS_ERR(clkdata->clk)) return PTR_ERR(clkdata->clk); - dev_set_drvdata(&pdev->dev, clkdata); - - return 0; -} - -static int twl6040_clk_remove(struct platform_device *pdev) -{ - struct twl6040_clk *clkdata = dev_get_drvdata(&pdev->dev); - - clk_unregister(clkdata->clk); + platform_set_drvdata(pdev, clkdata); return 0; } @@ -112,10 +102,8 @@ static struct platform_driver twl6040_clk_driver = { .driver = { .name = "twl6040-clk", - .owner = THIS_MODULE, }, .probe = twl6040_clk_probe, - .remove = twl6040_clk_remove, }; module_platform_driver(twl6040_clk_driver);