diff options
-rw-r--r-- | arch/arm/mach-ux500/mbox-db5500.c | 6 | ||||
-rw-r--r-- | arch/mips/rb532/gpio.c | 2 | ||||
-rw-r--r-- | drivers/video/msm/mddi.c | 2 | ||||
-rw-r--r-- | drivers/watchdog/bcm63xx_wdt.c | 2 |
4 files changed, 5 insertions, 7 deletions
diff --git a/arch/arm/mach-ux500/mbox-db5500.c b/arch/arm/mach-ux500/mbox-db5500.c index a4ffb9f4f461..2b2d51caf9d8 100644 --- a/arch/arm/mach-ux500/mbox-db5500.c +++ b/arch/arm/mach-ux500/mbox-db5500.c | |||
@@ -416,8 +416,7 @@ struct mbox *mbox_setup(u8 mbox_id, mbox_recv_cb_t *mbox_cb, void *priv) | |||
416 | dev_dbg(&(mbox->pdev->dev), | 416 | dev_dbg(&(mbox->pdev->dev), |
417 | "Resource name: %s start: 0x%X, end: 0x%X\n", | 417 | "Resource name: %s start: 0x%X, end: 0x%X\n", |
418 | resource->name, resource->start, resource->end); | 418 | resource->name, resource->start, resource->end); |
419 | mbox->virtbase_peer = | 419 | mbox->virtbase_peer = ioremap(resource->start, resource_size(resource)); |
420 | ioremap(resource->start, resource->end - resource->start); | ||
421 | if (!mbox->virtbase_peer) { | 420 | if (!mbox->virtbase_peer) { |
422 | dev_err(&(mbox->pdev->dev), "Unable to ioremap peer mbox\n"); | 421 | dev_err(&(mbox->pdev->dev), "Unable to ioremap peer mbox\n"); |
423 | mbox = NULL; | 422 | mbox = NULL; |
@@ -440,8 +439,7 @@ struct mbox *mbox_setup(u8 mbox_id, mbox_recv_cb_t *mbox_cb, void *priv) | |||
440 | dev_dbg(&(mbox->pdev->dev), | 439 | dev_dbg(&(mbox->pdev->dev), |
441 | "Resource name: %s start: 0x%X, end: 0x%X\n", | 440 | "Resource name: %s start: 0x%X, end: 0x%X\n", |
442 | resource->name, resource->start, resource->end); | 441 | resource->name, resource->start, resource->end); |
443 | mbox->virtbase_local = | 442 | mbox->virtbase_local = ioremap(resource->start, resource_size(resource)); |
444 | ioremap(resource->start, resource->end - resource->start); | ||
445 | if (!mbox->virtbase_local) { | 443 | if (!mbox->virtbase_local) { |
446 | dev_err(&(mbox->pdev->dev), "Unable to ioremap local mbox\n"); | 444 | dev_err(&(mbox->pdev->dev), "Unable to ioremap local mbox\n"); |
447 | mbox = NULL; | 445 | mbox = NULL; |
diff --git a/arch/mips/rb532/gpio.c b/arch/mips/rb532/gpio.c index 37de05d595e7..6c47dfeb7be3 100644 --- a/arch/mips/rb532/gpio.c +++ b/arch/mips/rb532/gpio.c | |||
@@ -185,7 +185,7 @@ int __init rb532_gpio_init(void) | |||
185 | struct resource *r; | 185 | struct resource *r; |
186 | 186 | ||
187 | r = rb532_gpio_reg0_res; | 187 | r = rb532_gpio_reg0_res; |
188 | rb532_gpio_chip->regbase = ioremap_nocache(r->start, r->end - r->start); | 188 | rb532_gpio_chip->regbase = ioremap_nocache(r->start, resource_size(r)); |
189 | 189 | ||
190 | if (!rb532_gpio_chip->regbase) { | 190 | if (!rb532_gpio_chip->regbase) { |
191 | printk(KERN_ERR "rb532: cannot remap GPIO register 0\n"); | 191 | printk(KERN_ERR "rb532: cannot remap GPIO register 0\n"); |
diff --git a/drivers/video/msm/mddi.c b/drivers/video/msm/mddi.c index b66d86ac7cea..178b0720bd79 100644 --- a/drivers/video/msm/mddi.c +++ b/drivers/video/msm/mddi.c | |||
@@ -679,7 +679,7 @@ static int __devinit mddi_probe(struct platform_device *pdev) | |||
679 | printk(KERN_ERR "mddi: no associated mem resource!\n"); | 679 | printk(KERN_ERR "mddi: no associated mem resource!\n"); |
680 | return -ENOMEM; | 680 | return -ENOMEM; |
681 | } | 681 | } |
682 | mddi->base = ioremap(resource->start, resource->end - resource->start); | 682 | mddi->base = ioremap(resource->start, resource_size(resource)); |
683 | if (!mddi->base) { | 683 | if (!mddi->base) { |
684 | printk(KERN_ERR "mddi: failed to remap base!\n"); | 684 | printk(KERN_ERR "mddi: failed to remap base!\n"); |
685 | ret = -EINVAL; | 685 | ret = -EINVAL; |
diff --git a/drivers/watchdog/bcm63xx_wdt.c b/drivers/watchdog/bcm63xx_wdt.c index 3c5045a206dd..5064e8317521 100644 --- a/drivers/watchdog/bcm63xx_wdt.c +++ b/drivers/watchdog/bcm63xx_wdt.c | |||
@@ -248,7 +248,7 @@ static int __devinit bcm63xx_wdt_probe(struct platform_device *pdev) | |||
248 | return -ENODEV; | 248 | return -ENODEV; |
249 | } | 249 | } |
250 | 250 | ||
251 | bcm63xx_wdt_device.regs = ioremap_nocache(r->start, r->end - r->start); | 251 | bcm63xx_wdt_device.regs = ioremap_nocache(r->start, resource_size(r)); |
252 | if (!bcm63xx_wdt_device.regs) { | 252 | if (!bcm63xx_wdt_device.regs) { |
253 | dev_err(&pdev->dev, "failed to remap I/O resources\n"); | 253 | dev_err(&pdev->dev, "failed to remap I/O resources\n"); |
254 | return -ENXIO; | 254 | return -ENXIO; |