hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/clk/mediatek/clk-mt7622.c
....@@ -1,16 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (c) 2017 MediaTek Inc.
34 * Author: Chen Zhong <chen.zhong@mediatek.com>
45 * 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.
146 */
157
168 #include <linux/clk-provider.h>
....@@ -622,9 +614,8 @@
622614 struct clk_onecell_data *clk_data;
623615 void __iomem *base;
624616 struct device_node *node = pdev->dev.of_node;
625
- struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
626617
627
- base = devm_ioremap_resource(&pdev->dev, res);
618
+ base = devm_platform_ioremap_resource(pdev, 0);
628619 if (IS_ERR(base))
629620 return PTR_ERR(base);
630621
....@@ -703,9 +694,8 @@
703694 void __iomem *base;
704695 int r;
705696 struct device_node *node = pdev->dev.of_node;
706
- struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
707697
708
- base = devm_ioremap_resource(&pdev->dev, res);
698
+ base = devm_platform_ioremap_resource(pdev, 0);
709699 if (IS_ERR(base))
710700 return PTR_ERR(base);
711701