mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-02-25 02:35:52 +07:00
net: ethernet: ti: use devm_platform_ioremap_resource() to simplify code
Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: YueHaibing <yuehaibing@huawei.com> Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
eba39fd6fe
commit
c8ace62ff3
@ -2764,7 +2764,7 @@ static int cpsw_probe(struct platform_device *pdev)
|
||||
struct net_device *ndev;
|
||||
struct cpsw_priv *priv;
|
||||
void __iomem *ss_regs;
|
||||
struct resource *res, *ss_res;
|
||||
struct resource *ss_res;
|
||||
struct gpio_descs *mode;
|
||||
const struct soc_device_attribute *soc;
|
||||
struct cpsw_common *cpsw;
|
||||
@ -2798,8 +2798,7 @@ static int cpsw_probe(struct platform_device *pdev)
|
||||
return PTR_ERR(ss_regs);
|
||||
cpsw->regs = ss_regs;
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
|
||||
cpsw->wr_regs = devm_ioremap_resource(dev, res);
|
||||
cpsw->wr_regs = devm_platform_ioremap_resource(pdev, 1);
|
||||
if (IS_ERR(cpsw->wr_regs))
|
||||
return PTR_ERR(cpsw->wr_regs);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user