hc
2024-10-12 a5969cabbb4660eab42b6ef0412cbbd1200cf14d
kernel/drivers/char/hw_random/hisi-rng.c
....@@ -1,9 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (C) 2016 HiSilicon Co., Ltd.
3
- *
4
- * This program is free software; you can redistribute it and/or modify
5
- * it under the terms of the GNU General Public License version 2 as
6
- * published by the Free Software Foundation.
74 */
85
96 #include <linux/err.h>
....@@ -76,7 +73,6 @@
7673 static int hisi_rng_probe(struct platform_device *pdev)
7774 {
7875 struct hisi_rng *rng;
79
- struct resource *res;
8076 int ret;
8177
8278 rng = devm_kzalloc(&pdev->dev, sizeof(*rng), GFP_KERNEL);
....@@ -85,8 +81,7 @@
8581
8682 platform_set_drvdata(pdev, rng);
8783
88
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
89
- rng->base = devm_ioremap_resource(&pdev->dev, res);
84
+ rng->base = devm_platform_ioremap_resource(pdev, 0);
9085 if (IS_ERR(rng->base))
9186 return PTR_ERR(rng->base);
9287
....@@ -104,7 +99,7 @@
10499 return 0;
105100 }
106101
107
-static const struct of_device_id hisi_rng_dt_ids[] = {
102
+static const struct of_device_id hisi_rng_dt_ids[] __maybe_unused = {
108103 { .compatible = "hisilicon,hip04-rng" },
109104 { .compatible = "hisilicon,hip05-rng" },
110105 { }