spi: spi_txx9.c: use resource_size()
authorhartleys <hartleys@visionengravers.com>
Mon, 14 Dec 2009 22:43:42 +0000 (22:43 +0000)
committerGrant Likely <grant.likely@secretlab.ca>
Thu, 17 Dec 2009 16:00:22 +0000 (09:00 -0700)
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>
drivers/spi/spi_txx9.c

index 96057de133ad311a3159944c69adcb70b63930ec..c166eb5ad3c501ddbe718fe68c1b9fb13e7ce89e 100644 (file)
@@ -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;