diff options
-rw-r--r-- | drivers/mfd/glamo/glamo-core.c | 16 | ||||
-rw-r--r-- | include/linux/mfd/glamo.h | 12 |
2 files changed, 15 insertions, 13 deletions
diff --git a/drivers/mfd/glamo/glamo-core.c b/drivers/mfd/glamo/glamo-core.c index 90a193fe21b..b15f0fc0974 100644 --- a/drivers/mfd/glamo/glamo-core.c +++ b/drivers/mfd/glamo/glamo-core.c @@ -901,7 +901,7 @@ static int __devinit glamo_supported(struct glamo_core *glamo) static int __devinit glamo_probe(struct platform_device *pdev) { - int ret = 0, irq; + int ret = 0, irq, irq_base; struct glamo_core *glamo; struct resource *mem; @@ -914,7 +914,7 @@ static int __devinit glamo_probe(struct platform_device *pdev) glamo->pdev = pdev; mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); glamo->irq = platform_get_irq(pdev, 0); - glamo->irq_base = platform_get_irq(pdev, 1); + glamo->irq_base = irq_base = platform_get_irq(pdev, 1); glamo->pdata = pdev->dev.platform_data; if (glamo->irq < 0) { @@ -923,7 +923,7 @@ static int __devinit glamo_probe(struct platform_device *pdev) goto err_free; } - if (glamo->irq_base < 0) { + if (irq_base < 0) { ret = glamo->irq; dev_err(&pdev->dev, "Failed to get glamo irq base: %d\n", ret); goto err_free; @@ -980,8 +980,9 @@ static int __devinit glamo_probe(struct platform_device *pdev) /* * finally set the mfd interrupts up */ - for (irq = glamo->irq_base; irq < glamo->irq_base + GLAMO_NR_IRQS; ++irq) { - set_irq_chip_and_handler(irq, &glamo_irq_chip, handle_level_irq); + for (irq = irq_base; irq < irq_base + GLAMO_NR_IRQS; ++irq) { + set_irq_chip_and_handler(irq, &glamo_irq_chip, + handle_level_irq); set_irq_flags(irq, IRQF_VALID); set_irq_chip_data(irq, glamo); } @@ -1010,7 +1011,7 @@ err_free_irqs: set_irq_chained_handler(glamo->irq, NULL); set_irq_chip_data(glamo->irq, NULL); - for (irq = glamo->irq_base; irq < glamo->irq_base + GLAMO_NR_IRQS; ++irq) { + for (irq = irq_base; irq < irq_base + GLAMO_NR_IRQS; ++irq) { set_irq_flags(irq, 0); set_irq_chip(irq, NULL); set_irq_chip_data(irq, NULL); @@ -1030,6 +1031,7 @@ static int __devexit glamo_remove(struct platform_device *pdev) { struct glamo_core *glamo = platform_get_drvdata(pdev); int irq; + int irq_base = glamo->irq_base; mfd_remove_devices(&pdev->dev); @@ -1037,7 +1039,7 @@ static int __devexit glamo_remove(struct platform_device *pdev) set_irq_chained_handler(glamo->irq, NULL); set_irq_chip_data(glamo->irq, NULL); - for (irq = glamo->irq_base; irq < glamo->irq_base + GLAMO_NR_IRQS; ++irq) { + for (irq = irq_base; irq < irq_base + GLAMO_NR_IRQS; ++irq) { set_irq_flags(irq, 0); set_irq_chip(irq, NULL); set_irq_chip_data(irq, NULL); diff --git a/include/linux/mfd/glamo.h b/include/linux/mfd/glamo.h index 566948b3cfc..529d4f07f03 100644 --- a/include/linux/mfd/glamo.h +++ b/include/linux/mfd/glamo.h @@ -8,7 +8,7 @@ struct glamo_fb_platform_data; struct glamo_mmc_platform_data { int (*glamo_mmc_use_slow)(void); - struct glamo_core *core; + struct glamo_core *core; }; struct glamo_gpio_platform_data { @@ -17,13 +17,13 @@ struct glamo_gpio_platform_data { }; struct glamo_platform_data { - struct glamo_fb_platform_data *fb_data; - struct glamo_mmc_platform_data *mmc_data; - struct glamo_gpio_platform_data *gpio_data; + struct glamo_fb_platform_data *fb_data; + struct glamo_mmc_platform_data *mmc_data; + struct glamo_gpio_platform_data *gpio_data; - unsigned int osci_clock_rate; + unsigned int osci_clock_rate; - void (*glamo_external_reset)(int); + void (*glamo_external_reset)(int); }; enum glamo_engine { |