hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/drivers/char/hw_random/pic32-rng.c
....@@ -1,17 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * PIC32 RNG driver
34 *
45 * Joshua Henderson <joshua.henderson@microchip.com>
56 * Copyright (C) 2016 Microchip Technology Inc. All rights reserved.
6
- *
7
- * This program is free software; you can distribute it and/or modify it
8
- * under the terms of the GNU General Public License (Version 2) as
9
- * published by the Free Software Foundation.
10
- *
11
- * This program is distributed in the hope it will be useful, but WITHOUT
12
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14
- * for more details.
157 */
168
179 #include <linux/clk.h>
....@@ -78,7 +70,6 @@
7870 static int pic32_rng_probe(struct platform_device *pdev)
7971 {
8072 struct pic32_rng *priv;
81
- struct resource *res;
8273 u32 v;
8374 int ret;
8475
....@@ -86,8 +77,7 @@
8677 if (!priv)
8778 return -ENOMEM;
8879
89
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
90
- priv->base = devm_ioremap_resource(&pdev->dev, res);
80
+ priv->base = devm_platform_ioremap_resource(pdev, 0);
9181 if (IS_ERR(priv->base))
9282 return PTR_ERR(priv->base);
9383
....@@ -129,7 +119,7 @@
129119 return 0;
130120 }
131121
132
-static const struct of_device_id pic32_rng_of_match[] = {
122
+static const struct of_device_id pic32_rng_of_match[] __maybe_unused = {
133123 { .compatible = "microchip,pic32mzda-rng", },
134124 { /* sentinel */ }
135125 };