forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-10-12 a5969cabbb4660eab42b6ef0412cbbd1200cf14d
kernel/drivers/clk/hisilicon/reset.c
....@@ -1,20 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Hisilicon Reset Controller Driver
34 *
45 * Copyright (c) 2015-2016 HiSilicon Technologies Co., Ltd.
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License as published by
8
- * the Free Software Foundation; either version 2 of the License, or
9
- * (at your option) any later version.
10
- *
11
- * This program is distributed in the hope that it will be useful,
12
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- * GNU General Public License for more details.
15
- *
16
- * You should have received a copy of the GNU General Public License
17
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
186 */
197
208 #include <linux/io.h>
....@@ -102,14 +90,12 @@
10290 struct hisi_reset_controller *hisi_reset_init(struct platform_device *pdev)
10391 {
10492 struct hisi_reset_controller *rstc;
105
- struct resource *res;
10693
10794 rstc = devm_kmalloc(&pdev->dev, sizeof(*rstc), GFP_KERNEL);
10895 if (!rstc)
10996 return NULL;
11097
111
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
112
- rstc->membase = devm_ioremap_resource(&pdev->dev, res);
98
+ rstc->membase = devm_platform_ioremap_resource(pdev, 0);
11399 if (IS_ERR(rstc->membase))
114100 return NULL;
115101