forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 9999e48639b3cecb08ffb37358bcba3b48161b29
kernel/drivers/net/ethernet/stmicro/stmmac/dwmac-meson.c
....@@ -1,14 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Amlogic Meson6 and Meson8 DWMAC glue layer
34 *
45 * Copyright (C) 2014 Beniamino Galvani <b.galvani@gmail.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
- * You should have received a copy of the GNU General Public License
11
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
126 */
137
148 #include <linux/device.h>
....@@ -52,7 +46,6 @@
5246 struct plat_stmmacenet_data *plat_dat;
5347 struct stmmac_resources stmmac_res;
5448 struct meson_dwmac *dwmac;
55
- struct resource *res;
5649 int ret;
5750
5851 ret = stmmac_get_platform_resources(pdev, &stmmac_res);
....@@ -69,8 +62,7 @@
6962 goto err_remove_config_dt;
7063 }
7164
72
- res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
73
- dwmac->reg = devm_ioremap_resource(&pdev->dev, res);
65
+ dwmac->reg = devm_platform_ioremap_resource(pdev, 1);
7466 if (IS_ERR(dwmac->reg)) {
7567 ret = PTR_ERR(dwmac->reg);
7668 goto err_remove_config_dt;