hc
2024-05-10 23fa18eaa71266feff7ba8d83022d9e1cc83c65a
kernel/arch/powerpc/platforms/pseries/rng.c
....@@ -1,10 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Copyright 2013, Michael Ellerman, IBM Corporation.
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) "pseries-rng: " fmt
....@@ -14,6 +10,7 @@
1410 #include <asm/archrandom.h>
1511 #include <asm/machdep.h>
1612 #include <asm/plpar_wrappers.h>
13
+#include "pseries.h"
1714
1815
1916 static int pseries_get_random_long(unsigned long *v)
....@@ -28,19 +25,13 @@
2825 return 0;
2926 }
3027
31
-static __init int rng_init(void)
28
+void __init pseries_rng_init(void)
3229 {
3330 struct device_node *dn;
3431
3532 dn = of_find_compatible_node(NULL, NULL, "ibm,random");
3633 if (!dn)
37
- return -ENODEV;
38
-
39
- pr_info("Registering arch random hook.\n");
40
-
34
+ return;
4135 ppc_md.get_random_seed = pseries_get_random_long;
42
-
4336 of_node_put(dn);
44
- return 0;
4537 }
46
-machine_subsys_initcall(pseries, rng_init);