forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-04 1543e317f1da31b75942316931e8f491a8920811
kernel/arch/mips/pci/pci-ar724x.c
....@@ -1,12 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Atheros AR724X PCI host controller driver
34 *
45 * Copyright (C) 2011 René Bolldorf <xsecute@googlemail.com>
56 * Copyright (C) 2009-2011 Gabor Juhos <juhosg@openwrt.org>
6
- *
7
- * This program is free software; you can redistribute it and/or modify it
8
- * under the terms of the GNU General Public License version 2 as published
9
- * by the Free Software Foundation.
107 */
118
129 #include <linux/irq.h>
....@@ -375,18 +372,15 @@
375372 if (!apc)
376373 return -ENOMEM;
377374
378
- res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "ctrl_base");
379
- apc->ctrl_base = devm_ioremap_resource(&pdev->dev, res);
375
+ apc->ctrl_base = devm_platform_ioremap_resource_byname(pdev, "ctrl_base");
380376 if (IS_ERR(apc->ctrl_base))
381377 return PTR_ERR(apc->ctrl_base);
382378
383
- res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "cfg_base");
384
- apc->devcfg_base = devm_ioremap_resource(&pdev->dev, res);
379
+ apc->devcfg_base = devm_platform_ioremap_resource_byname(pdev, "cfg_base");
385380 if (IS_ERR(apc->devcfg_base))
386381 return PTR_ERR(apc->devcfg_base);
387382
388
- res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "crp_base");
389
- apc->crp_base = devm_ioremap_resource(&pdev->dev, res);
383
+ apc->crp_base = devm_platform_ioremap_resource_byname(pdev, "crp_base");
390384 if (IS_ERR(apc->crp_base))
391385 return PTR_ERR(apc->crp_base);
392386