.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * 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. |
---|
8 | 4 | */ |
---|
9 | 5 | |
---|
10 | 6 | #define pr_fmt(fmt) "pseries-rng: " fmt |
---|
.. | .. |
---|
14 | 10 | #include <asm/archrandom.h> |
---|
15 | 11 | #include <asm/machdep.h> |
---|
16 | 12 | #include <asm/plpar_wrappers.h> |
---|
| 13 | +#include "pseries.h" |
---|
17 | 14 | |
---|
18 | 15 | |
---|
19 | 16 | static int pseries_get_random_long(unsigned long *v) |
---|
.. | .. |
---|
28 | 25 | return 0; |
---|
29 | 26 | } |
---|
30 | 27 | |
---|
31 | | -static __init int rng_init(void) |
---|
| 28 | +void __init pseries_rng_init(void) |
---|
32 | 29 | { |
---|
33 | 30 | struct device_node *dn; |
---|
34 | 31 | |
---|
35 | 32 | dn = of_find_compatible_node(NULL, NULL, "ibm,random"); |
---|
36 | 33 | if (!dn) |
---|
37 | | - return -ENODEV; |
---|
38 | | - |
---|
39 | | - pr_info("Registering arch random hook.\n"); |
---|
40 | | - |
---|
| 34 | + return; |
---|
41 | 35 | ppc_md.get_random_seed = pseries_get_random_long; |
---|
42 | | - |
---|
43 | 36 | of_node_put(dn); |
---|
44 | | - return 0; |
---|
45 | 37 | } |
---|
46 | | -machine_subsys_initcall(pseries, rng_init); |
---|