.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (c) 2017 MediaTek Inc. |
---|
3 | 4 | * Author: Chen Zhong <chen.zhong@mediatek.com> |
---|
4 | 5 | * Sean Wang <sean.wang@mediatek.com> |
---|
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 version 2 as |
---|
8 | | - * published by the Free Software Foundation. |
---|
9 | | - * |
---|
10 | | - * This program is distributed in the hope that it will be useful, |
---|
11 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
12 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
13 | | - * GNU General Public License for more details. |
---|
14 | 6 | */ |
---|
15 | 7 | |
---|
16 | 8 | #include <linux/clk-provider.h> |
---|
.. | .. |
---|
622 | 614 | struct clk_onecell_data *clk_data; |
---|
623 | 615 | void __iomem *base; |
---|
624 | 616 | struct device_node *node = pdev->dev.of_node; |
---|
625 | | - struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
---|
626 | 617 | |
---|
627 | | - base = devm_ioremap_resource(&pdev->dev, res); |
---|
| 618 | + base = devm_platform_ioremap_resource(pdev, 0); |
---|
628 | 619 | if (IS_ERR(base)) |
---|
629 | 620 | return PTR_ERR(base); |
---|
630 | 621 | |
---|
.. | .. |
---|
703 | 694 | void __iomem *base; |
---|
704 | 695 | int r; |
---|
705 | 696 | struct device_node *node = pdev->dev.of_node; |
---|
706 | | - struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
---|
707 | 697 | |
---|
708 | | - base = devm_ioremap_resource(&pdev->dev, res); |
---|
| 698 | + base = devm_platform_ioremap_resource(pdev, 0); |
---|
709 | 699 | if (IS_ERR(base)) |
---|
710 | 700 | return PTR_ERR(base); |
---|
711 | 701 | |
---|