gpio: tegra: fix duplicate code
Mayuresh Kulkarni [Tue, 24 Apr 2012 09:24:04 +0000 (14:24 +0530)]
Change-Id: Iea26161a63de1f785375c96121716a44baa3b4d4
Signed-off-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
Reviewed-on: http://git-master/r/98403
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

drivers/gpio/gpio-tegra.c

index 1c50690..649212b 100644 (file)
@@ -473,19 +473,6 @@ static int __devinit tegra_gpio_probe(struct platform_device *pdev)
 
        tegra_gpio_bank_stride = config->bank_stride;
        tegra_gpio_upper_offset = config->upper_offset;
-
-       for (i = 0; i < ARRAY_SIZE(tegra_gpio_banks); i++) {
-               res = platform_get_resource(pdev, IORESOURCE_IRQ, i);
-               if (!res) {
-                       dev_err(&pdev->dev, "Missing IRQ resource\n");
-                       return -ENODEV;
-               }
-
-               bank = &tegra_gpio_banks[i];
-               bank->bank = i;
-               bank->irq = res->start;
-       }
-
        tegra_gpio_chip.ngpio = ARRAY_SIZE(tegra_gpio_banks) * 32;
 
        irq_base = irq_alloc_descs(-1, 0, tegra_gpio_chip.ngpio, 0);