diff options
author | hartleys <hartleys@visionengravers.com> | 2009-12-14 22:43:42 +0000 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2009-12-17 09:00:22 -0700 |
commit | d53342bf9616ecd7e4a03fece167d0f53b195e87 (patch) | |
tree | 55f406c1de60da0846d6a3a271cba110b972f791 /drivers/spi/spi_txx9.c | |
parent | 76b6fdd35a2d796febd5dbe0e25f42e2616bfed3 (diff) | |
download | op-kernel-dev-d53342bf9616ecd7e4a03fece167d0f53b195e87.zip op-kernel-dev-d53342bf9616ecd7e4a03fece167d0f53b195e87.tar.gz |
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>
Diffstat (limited to 'drivers/spi/spi_txx9.c')
-rw-r--r-- | drivers/spi/spi_txx9.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/spi/spi_txx9.c b/drivers/spi/spi_txx9.c index 96057de..c166eb5 100644 --- a/drivers/spi/spi_txx9.c +++ b/drivers/spi/spi_txx9.c @@ -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; |