hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/drivers/char/hw_random/powernv-rng.c
....@@ -1,10 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Copyright 2013 Michael Ellerman, Guo Chao, IBM Corp.
3
- *
4
- * This program is free software; you can redistribute it and/or
5
- * modify it under the terms of the GNU General Public License
6
- * as published by the Free Software Foundation; either version
7
- * 2 of the License, or (at your option) any later version.
84 */
95
106 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
....@@ -37,18 +33,11 @@
3733 .read = powernv_rng_read,
3834 };
3935
40
-static int powernv_rng_remove(struct platform_device *pdev)
41
-{
42
- hwrng_unregister(&powernv_hwrng);
43
-
44
- return 0;
45
-}
46
-
4736 static int powernv_rng_probe(struct platform_device *pdev)
4837 {
4938 int rc;
5039
51
- rc = hwrng_register(&powernv_hwrng);
40
+ rc = devm_hwrng_register(&pdev->dev, &powernv_hwrng);
5241 if (rc) {
5342 /* We only register one device, ignore any others */
5443 if (rc == -EEXIST)
....@@ -74,7 +63,6 @@
7463 .of_match_table = powernv_rng_match,
7564 },
7665 .probe = powernv_rng_probe,
77
- .remove = powernv_rng_remove,
7866 };
7967 module_platform_driver(powernv_rng_driver);
8068