Skip to content

Commit

Permalink
spi: spi_txx9.c: use resource_size()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
hartleys authored and Grant Likely committed Dec 17, 2009
1 parent 76b6fdd commit d53342b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/spi/spi_txx9.c
Original file line number Diff line number Diff line change
Expand Up @@ -376,12 +376,10 @@ static int __init txx9spi_probe(struct platform_device *dev)
res = platform_get_resource(dev, IORESOURCE_MEM, 0);
if (!res)
goto exit_busy;
if (!devm_request_mem_region(&dev->dev,
res->start, res->end - res->start + 1,
if (!devm_request_mem_region(&dev->dev, res->start, resource_size(res),
"spi_txx9"))
goto exit_busy;
c->membase = devm_ioremap(&dev->dev,
res->start, res->end - res->start + 1);
c->membase = devm_ioremap(&dev->dev, res->start, resource_size(res));
if (!c->membase)
goto exit_busy;

Expand Down

0 comments on commit d53342b

Please sign in to comment.