| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Hisilicon Reset Controller Driver |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * 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/>. |
|---|
| 18 | 6 | */ |
|---|
| 19 | 7 | |
|---|
| 20 | 8 | #include <linux/io.h> |
|---|
| .. | .. |
|---|
| 102 | 90 | struct hisi_reset_controller *hisi_reset_init(struct platform_device *pdev) |
|---|
| 103 | 91 | { |
|---|
| 104 | 92 | struct hisi_reset_controller *rstc; |
|---|
| 105 | | - struct resource *res; |
|---|
| 106 | 93 | |
|---|
| 107 | 94 | rstc = devm_kmalloc(&pdev->dev, sizeof(*rstc), GFP_KERNEL); |
|---|
| 108 | 95 | if (!rstc) |
|---|
| 109 | 96 | return NULL; |
|---|
| 110 | 97 | |
|---|
| 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); |
|---|
| 113 | 99 | if (IS_ERR(rstc->membase)) |
|---|
| 114 | 100 | return NULL; |
|---|
| 115 | 101 | |
|---|