forked from Minki/linux
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>
This commit is contained in:
parent
0f00658d73
commit
ba539319cc
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user