diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2021-06-09 21:51:38 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-06-09 15:27:55 -0700 |
commit | ba539319cce68e670bfc16571da89066046719e2 (patch) | |
tree | 2cb72d89cdd8e740fbe5920fd4c45703f6aea201 /drivers/net/ethernet | |
parent | 0f00658d737813ec1edba9e580fa905035e7c710 (diff) | |
download | linux-ba539319cce68e670bfc16571da89066046719e2.tar.bz2 |
net: ethernet: ti: cpsw-phy-sel: Use devm_platform_ioremap_resource_byname()
Use the devm_platform_ioremap_resource_byname() helper instead of
calling platform_get_resource_byname() and devm_ioremap_resource()
separately.
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r-- | drivers/net/ethernet/ti/cpsw-phy-sel.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ethernet/ti/cpsw-phy-sel.c b/drivers/net/ethernet/ti/cpsw-phy-sel.c index 6e72ecbe5cf7..e8f38e3f7706 100644 --- a/drivers/net/ethernet/ti/cpsw-phy-sel.c +++ b/drivers/net/ethernet/ti/cpsw-phy-sel.c @@ -206,7 +206,6 @@ static const struct of_device_id cpsw_phy_sel_id_table[] = { static int cpsw_phy_sel_probe(struct platform_device *pdev) { - struct resource *res; const struct of_device_id *of_id; struct cpsw_phy_sel_priv *priv; @@ -223,8 +222,7 @@ static int cpsw_phy_sel_probe(struct platform_device *pdev) priv->dev = &pdev->dev; priv->cpsw_phy_sel = of_id->data; - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "gmii-sel"); - priv->gmii_sel = devm_ioremap_resource(&pdev->dev, res); + priv->gmii_sel = devm_platform_ioremap_resource_byname(pdev, "gmii-sel"); if (IS_ERR(priv->gmii_sel)) return PTR_ERR(priv->gmii_sel); |