diff options
Diffstat (limited to 'drivers/mfd/htc-egpio.c')
| -rw-r--r-- | drivers/mfd/htc-egpio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mfd/htc-egpio.c b/drivers/mfd/htc-egpio.c index 1a4d04664d6d..aa266e1f69b2 100644 --- a/drivers/mfd/htc-egpio.c +++ b/drivers/mfd/htc-egpio.c | |||
| @@ -286,7 +286,7 @@ static int __init egpio_probe(struct platform_device *pdev) | |||
| 286 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 286 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
| 287 | if (!res) | 287 | if (!res) |
| 288 | goto fail; | 288 | goto fail; |
| 289 | ei->base_addr = ioremap_nocache(res->start, res->end - res->start); | 289 | ei->base_addr = ioremap_nocache(res->start, resource_size(res)); |
| 290 | if (!ei->base_addr) | 290 | if (!ei->base_addr) |
| 291 | goto fail; | 291 | goto fail; |
| 292 | pr_debug("EGPIO phys=%08x virt=%p\n", (u32)res->start, ei->base_addr); | 292 | pr_debug("EGPIO phys=%08x virt=%p\n", (u32)res->start, ei->base_addr); |
| @@ -307,7 +307,7 @@ static int __init egpio_probe(struct platform_device *pdev) | |||
| 307 | 307 | ||
| 308 | ei->nchips = pdata->num_chips; | 308 | ei->nchips = pdata->num_chips; |
| 309 | ei->chip = kzalloc(sizeof(struct egpio_chip) * ei->nchips, GFP_KERNEL); | 309 | ei->chip = kzalloc(sizeof(struct egpio_chip) * ei->nchips, GFP_KERNEL); |
| 310 | if (!ei) { | 310 | if (!ei->chip) { |
| 311 | ret = -ENOMEM; | 311 | ret = -ENOMEM; |
| 312 | goto fail; | 312 | goto fail; |
| 313 | } | 313 | } |
