From: Matthias Ludwig Date: Thu, 7 May 2009 22:00:12 +0000 (-0700) Subject: smsc911x: fix calculation of res_size for ioremap X-Git-Tag: v2.6.31-rc1~14^2~527 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=928f308f556f4943e50c5064b546f47bce301f02;p=platform%2Fkernel%2Flinux-3.10.git smsc911x: fix calculation of res_size for ioremap fix size of remaped iomem, which is 1 byte to small (e.g. mappes only 0xff bytes instead of 0x100) Signed-off-by: Matthias Ludwig Acked-by: Steve Glendinning Signed-off-by: David S. Miller --- diff --git a/drivers/net/smsc911x.c b/drivers/net/smsc911x.c index 9a8528c..3cff840 100644 --- a/drivers/net/smsc911x.c +++ b/drivers/net/smsc911x.c @@ -1976,7 +1976,7 @@ static int __devinit smsc911x_drv_probe(struct platform_device *pdev) retval = -ENODEV; goto out_0; } - res_size = res->end - res->start; + res_size = res->end - res->start + 1; irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); if (!irq_res) {