| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Amlogic Meson6 and Meson8 DWMAC glue layer |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * 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/>. |
|---|
| 12 | 6 | */ |
|---|
| 13 | 7 | |
|---|
| 14 | 8 | #include <linux/device.h> |
|---|
| .. | .. |
|---|
| 52 | 46 | struct plat_stmmacenet_data *plat_dat; |
|---|
| 53 | 47 | struct stmmac_resources stmmac_res; |
|---|
| 54 | 48 | struct meson_dwmac *dwmac; |
|---|
| 55 | | - struct resource *res; |
|---|
| 56 | 49 | int ret; |
|---|
| 57 | 50 | |
|---|
| 58 | 51 | ret = stmmac_get_platform_resources(pdev, &stmmac_res); |
|---|
| .. | .. |
|---|
| 69 | 62 | goto err_remove_config_dt; |
|---|
| 70 | 63 | } |
|---|
| 71 | 64 | |
|---|
| 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); |
|---|
| 74 | 66 | if (IS_ERR(dwmac->reg)) { |
|---|
| 75 | 67 | ret = PTR_ERR(dwmac->reg); |
|---|
| 76 | 68 | goto err_remove_config_dt; |
|---|