diff options
Diffstat (limited to 'drivers/char/hw_random/msm-rng.c')
-rw-r--r-- | drivers/char/hw_random/msm-rng.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/char/hw_random/msm-rng.c b/drivers/char/hw_random/msm-rng.c index cea1c703d62f..96fb986402eb 100644 --- a/drivers/char/hw_random/msm-rng.c +++ b/drivers/char/hw_random/msm-rng.c | |||
@@ -157,7 +157,7 @@ static int msm_rng_probe(struct platform_device *pdev) | |||
157 | rng->hwrng.cleanup = msm_rng_cleanup, | 157 | rng->hwrng.cleanup = msm_rng_cleanup, |
158 | rng->hwrng.read = msm_rng_read, | 158 | rng->hwrng.read = msm_rng_read, |
159 | 159 | ||
160 | ret = hwrng_register(&rng->hwrng); | 160 | ret = devm_hwrng_register(&pdev->dev, &rng->hwrng); |
161 | if (ret) { | 161 | if (ret) { |
162 | dev_err(&pdev->dev, "failed to register hwrng\n"); | 162 | dev_err(&pdev->dev, "failed to register hwrng\n"); |
163 | return ret; | 163 | return ret; |
@@ -166,14 +166,6 @@ static int msm_rng_probe(struct platform_device *pdev) | |||
166 | return 0; | 166 | return 0; |
167 | } | 167 | } |
168 | 168 | ||
169 | static int msm_rng_remove(struct platform_device *pdev) | ||
170 | { | ||
171 | struct msm_rng *rng = platform_get_drvdata(pdev); | ||
172 | |||
173 | hwrng_unregister(&rng->hwrng); | ||
174 | return 0; | ||
175 | } | ||
176 | |||
177 | static const struct of_device_id msm_rng_of_match[] = { | 169 | static const struct of_device_id msm_rng_of_match[] = { |
178 | { .compatible = "qcom,prng", }, | 170 | { .compatible = "qcom,prng", }, |
179 | {} | 171 | {} |
@@ -182,7 +174,6 @@ MODULE_DEVICE_TABLE(of, msm_rng_of_match); | |||
182 | 174 | ||
183 | static struct platform_driver msm_rng_driver = { | 175 | static struct platform_driver msm_rng_driver = { |
184 | .probe = msm_rng_probe, | 176 | .probe = msm_rng_probe, |
185 | .remove = msm_rng_remove, | ||
186 | .driver = { | 177 | .driver = { |
187 | .name = KBUILD_MODNAME, | 178 | .name = KBUILD_MODNAME, |
188 | .of_match_table = of_match_ptr(msm_rng_of_match), | 179 | .of_match_table = of_match_ptr(msm_rng_of_match), |