--- zzzz-none-000/linux-3.10.107/drivers/char/hw_random/octeon-rng.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/char/hw_random/octeon-rng.c 2021-02-04 17:41:59.000000000 +0000 @@ -10,7 +10,6 @@ */ #include -#include #include #include #include @@ -96,8 +95,8 @@ rng->ops = ops; - dev_set_drvdata(&pdev->dev, &rng->ops); - ret = hwrng_register(&rng->ops); + platform_set_drvdata(pdev, &rng->ops); + ret = devm_hwrng_register(&pdev->dev, &rng->ops); if (ret) return -ENOENT; @@ -106,22 +105,11 @@ return 0; } -static int __exit octeon_rng_remove(struct platform_device *pdev) -{ - struct hwrng *rng = dev_get_drvdata(&pdev->dev); - - hwrng_unregister(rng); - - return 0; -} - static struct platform_driver octeon_rng_driver = { .driver = { .name = "octeon_rng", - .owner = THIS_MODULE, }, .probe = octeon_rng_probe, - .remove = __exit_p(octeon_rng_remove), }; module_platform_driver(octeon_rng_driver);