hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/drivers/char/hw_random/virtio-rng.c
....@@ -1,20 +1,7 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Randomness driver for virtio
34 * Copyright (C) 2007, 2008 Rusty Russell IBM Corporation
4
- *
5
- * This program is free software; you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation; either version 2 of the License, or
8
- * (at your option) any later version.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program; if not, write to the Free Software
17
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
185 */
196
207 #include <linux/err.h>
....@@ -24,6 +11,7 @@
2411 #include <linux/virtio.h>
2512 #include <linux/virtio_rng.h>
2613 #include <linux/module.h>
14
+#include <linux/slab.h>
2715
2816 static DEFINE_IDA(rng_index_ida);
2917
....@@ -207,7 +195,7 @@
207195 }
208196 #endif
209197
210
-static struct virtio_device_id id_table[] = {
198
+static const struct virtio_device_id id_table[] = {
211199 { VIRTIO_ID_RNG, VIRTIO_DEV_ANY_ID },
212200 { 0 },
213201 };