summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/ti
diff options
context:
space:
mode:
authorGrygorii Strashko <grygorii.strashko@ti.com>2019-04-26 20:12:35 +0300
committerDavid S. Miller <davem@davemloft.net>2019-04-27 17:11:49 -0400
commit03f66f06756093c38927115502dd5e9277d3ca88 (patch)
tree272338e562db6a4139519ca9adc6ba04461c107f /drivers/net/ethernet/ti
parent7cb528c55379ffbffc7dca91397c5481422a6af5 (diff)
net: ethernet: ti: davinci_mdio: use devm_ioremap()
The Davinci MDIO in most of the case implemented as module inside of TI CPSW subsystem and fully depends on CPSW to be enabled, but historically it's implemented as separate Platform device/driver and defined in DT files in two ways: - as standalone node - as child node of CPSW subsystem. In later case it's required to split CPSW subsystem "reg" property to exclude MDIO I/O range which is not useful. Hence, replace devm_ioremap_resource() with devm_ioremap() to allow define full I/O range in parent CPSW subsystem without spliting. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/ti')
-rw-r--r--drivers/net/ethernet/ti/davinci_mdio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/ti/davinci_mdio.c b/drivers/net/ethernet/ti/davinci_mdio.c
index edb46fcdaddc..11642721c123 100644
--- a/drivers/net/ethernet/ti/davinci_mdio.c
+++ b/drivers/net/ethernet/ti/davinci_mdio.c
@@ -397,7 +397,7 @@ static int davinci_mdio_probe(struct platform_device *pdev)
data->dev = dev;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- data->regs = devm_ioremap_resource(dev, res);
+ data->regs = devm_ioremap(dev, res->start, resource_size(res));
if (IS_ERR(data->regs))
return PTR_ERR(data->regs);