diff options
Diffstat (limited to 'drivers/mfd')
-rw-r--r-- | drivers/mfd/asic3.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/mfd/asic3.c b/drivers/mfd/asic3.c index ebe889392b6d..d5dd0dfae872 100644 --- a/drivers/mfd/asic3.c +++ b/drivers/mfd/asic3.c | |||
@@ -623,7 +623,6 @@ static int __init asic3_probe(struct platform_device *pdev) | |||
623 | struct asic3 *asic; | 623 | struct asic3 *asic; |
624 | struct resource *mem; | 624 | struct resource *mem; |
625 | unsigned long clksel; | 625 | unsigned long clksel; |
626 | int map_size; | ||
627 | int ret = 0; | 626 | int ret = 0; |
628 | 627 | ||
629 | asic = kzalloc(sizeof(struct asic3), GFP_KERNEL); | 628 | asic = kzalloc(sizeof(struct asic3), GFP_KERNEL); |
@@ -643,8 +642,7 @@ static int __init asic3_probe(struct platform_device *pdev) | |||
643 | goto out_free; | 642 | goto out_free; |
644 | } | 643 | } |
645 | 644 | ||
646 | map_size = mem->end - mem->start + 1; | 645 | asic->mapping = ioremap(mem->start, resource_size(mem)); |
647 | asic->mapping = ioremap(mem->start, map_size); | ||
648 | if (!asic->mapping) { | 646 | if (!asic->mapping) { |
649 | ret = -ENOMEM; | 647 | ret = -ENOMEM; |
650 | dev_err(asic->dev, "Couldn't ioremap\n"); | 648 | dev_err(asic->dev, "Couldn't ioremap\n"); |
@@ -654,7 +652,7 @@ static int __init asic3_probe(struct platform_device *pdev) | |||
654 | asic->irq_base = pdata->irq_base; | 652 | asic->irq_base = pdata->irq_base; |
655 | 653 | ||
656 | /* calculate bus shift from mem resource */ | 654 | /* calculate bus shift from mem resource */ |
657 | asic->bus_shift = 2 - (map_size >> 12); | 655 | asic->bus_shift = 2 - (resource_size(mem) >> 12); |
658 | 656 | ||
659 | clksel = 0; | 657 | clksel = 0; |
660 | asic3_write_register(asic, ASIC3_OFFSET(CLOCK, SEL), clksel); | 658 | asic3_write_register(asic, ASIC3_OFFSET(CLOCK, SEL), clksel); |