summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/ti/cpsw-phy-sel.c
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2021-06-09 15:51:38 +0200
committerDavid S. Miller <davem@davemloft.net>2021-06-10 00:27:55 +0200
commitba539319cce68e670bfc16571da89066046719e2 (patch)
tree2cb72d89cdd8e740fbe5920fd4c45703f6aea201 /drivers/net/ethernet/ti/cpsw-phy-sel.c
parentMerge branch 'mvpp2-prefetch' (diff)
downloadlinux-ba539319cce68e670bfc16571da89066046719e2.tar.xz
linux-ba539319cce68e670bfc16571da89066046719e2.zip
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/ti/cpsw-phy-sel.c')
-rw-r--r--drivers/net/ethernet/ti/cpsw-phy-sel.c4
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);