rng->hwrng.cleanup = msm_rng_cleanup,
        rng->hwrng.read = msm_rng_read,
 
-       ret = hwrng_register(&rng->hwrng);
+       ret = devm_hwrng_register(&pdev->dev, &rng->hwrng);
        if (ret) {
                dev_err(&pdev->dev, "failed to register hwrng\n");
                return ret;
        return 0;
 }
 
-static int msm_rng_remove(struct platform_device *pdev)
-{
-       struct msm_rng *rng = platform_get_drvdata(pdev);
-
-       hwrng_unregister(&rng->hwrng);
-       return 0;
-}
-
 static const struct of_device_id msm_rng_of_match[] = {
        { .compatible = "qcom,prng", },
        {}
 
 static struct platform_driver msm_rng_driver = {
        .probe = msm_rng_probe,
-       .remove = msm_rng_remove,
        .driver = {
                .name = KBUILD_MODNAME,
                .of_match_table = of_match_ptr(msm_rng_of_match),