]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
pinctrl-baytrail: remove redundant ptr variable
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 10 Jul 2013 11:55:38 +0000 (14:55 +0300)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 22 Jul 2013 23:23:26 +0000 (01:23 +0200)
There is no need to have an additional variable in byt_gpio_reg().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinctrl-baytrail.c

index f3d30531266341d5236e77914d347aa206fa0fa6..71fa887547188d7ca548be25987c0e5813c5acdd 100644 (file)
@@ -135,15 +135,13 @@ static void __iomem *byt_gpio_reg(struct gpio_chip *chip, unsigned offset,
 {
        struct byt_gpio *vg = container_of(chip, struct byt_gpio, chip);
        u32 reg_offset;
-       void __iomem *ptr;
 
        if (reg == BYT_INT_STAT_REG)
                reg_offset = (offset / 32) * 4;
        else
                reg_offset = vg->range->pins[offset] * 16;
 
-       ptr = (void __iomem *) (vg->reg_base + reg_offset + reg);
-       return ptr;
+       return vg->reg_base + reg_offset + reg;
 }
 
 static int byt_gpio_request(struct gpio_chip *chip, unsigned offset)