mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 19:26:25 +00:00
spi: spi_txx9.c: use resource_size()
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
This commit is contained in:
parent
76b6fdd35a
commit
d53342bf96
1 changed files with 2 additions and 4 deletions
|
@ -376,12 +376,10 @@ static int __init txx9spi_probe(struct platform_device *dev)
|
||||||
res = platform_get_resource(dev, IORESOURCE_MEM, 0);
|
res = platform_get_resource(dev, IORESOURCE_MEM, 0);
|
||||||
if (!res)
|
if (!res)
|
||||||
goto exit_busy;
|
goto exit_busy;
|
||||||
if (!devm_request_mem_region(&dev->dev,
|
if (!devm_request_mem_region(&dev->dev, res->start, resource_size(res),
|
||||||
res->start, res->end - res->start + 1,
|
|
||||||
"spi_txx9"))
|
"spi_txx9"))
|
||||||
goto exit_busy;
|
goto exit_busy;
|
||||||
c->membase = devm_ioremap(&dev->dev,
|
c->membase = devm_ioremap(&dev->dev, res->start, resource_size(res));
|
||||||
res->start, res->end - res->start + 1);
|
|
||||||
if (!c->membase)
|
if (!c->membase)
|
||||||
goto exit_busy;
|
goto exit_busy;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue