.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * 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. |
---|
7 | 4 | */ |
---|
8 | 5 | |
---|
9 | 6 | #include <linux/err.h> |
---|
.. | .. |
---|
76 | 73 | static int hisi_rng_probe(struct platform_device *pdev) |
---|
77 | 74 | { |
---|
78 | 75 | struct hisi_rng *rng; |
---|
79 | | - struct resource *res; |
---|
80 | 76 | int ret; |
---|
81 | 77 | |
---|
82 | 78 | rng = devm_kzalloc(&pdev->dev, sizeof(*rng), GFP_KERNEL); |
---|
.. | .. |
---|
85 | 81 | |
---|
86 | 82 | platform_set_drvdata(pdev, rng); |
---|
87 | 83 | |
---|
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); |
---|
90 | 85 | if (IS_ERR(rng->base)) |
---|
91 | 86 | return PTR_ERR(rng->base); |
---|
92 | 87 | |
---|
.. | .. |
---|
104 | 99 | return 0; |
---|
105 | 100 | } |
---|
106 | 101 | |
---|
107 | | -static const struct of_device_id hisi_rng_dt_ids[] = { |
---|
| 102 | +static const struct of_device_id hisi_rng_dt_ids[] __maybe_unused = { |
---|
108 | 103 | { .compatible = "hisilicon,hip04-rng" }, |
---|
109 | 104 | { .compatible = "hisilicon,hip05-rng" }, |
---|
110 | 105 | { } |
---|