| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * COMBPHY driver for HiSilicon STB SoCs |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (C) 2016-2017 HiSilicon Co., Ltd. http://www.hisilicon.com |
|---|
| 5 | 6 | * |
|---|
| 6 | 7 | * Authors: Jianguo Sun <sunjianguo1@huawei.com> |
|---|
| 7 | | - * |
|---|
| 8 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 9 | | - * it under the terms of the GNU General Public License version 2 as |
|---|
| 10 | | - * published by the Free Software Foundation. |
|---|
| 11 | 8 | */ |
|---|
| 12 | 9 | |
|---|
| 13 | 10 | #include <linux/clk.h> |
|---|
| .. | .. |
|---|
| 198 | 195 | struct histb_combphy_priv *priv; |
|---|
| 199 | 196 | struct device_node *np = dev->of_node; |
|---|
| 200 | 197 | struct histb_combphy_mode *mode; |
|---|
| 201 | | - struct resource *res; |
|---|
| 202 | 198 | u32 vals[3]; |
|---|
| 203 | 199 | int ret; |
|---|
| 204 | 200 | |
|---|
| .. | .. |
|---|
| 206 | 202 | if (!priv) |
|---|
| 207 | 203 | return -ENOMEM; |
|---|
| 208 | 204 | |
|---|
| 209 | | - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
|---|
| 210 | | - priv->mmio = devm_ioremap_resource(dev, res); |
|---|
| 205 | + priv->mmio = devm_platform_ioremap_resource(pdev, 0); |
|---|
| 211 | 206 | if (IS_ERR(priv->mmio)) { |
|---|
| 212 | 207 | ret = PTR_ERR(priv->mmio); |
|---|
| 213 | 208 | return ret; |
|---|