[PATCH 3/5] pinctrl-baytrail: remove redundant ptr variable

From: Andy Shevchenko
Date: Wed Jul 10 2013 - 07:57:29 EST


There is no need to have an additional variable in byt_gpio_reg().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
---
drivers/pinctrl/pinctrl-baytrail.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/pinctrl/pinctrl-baytrail.c b/drivers/pinctrl/pinctrl-baytrail.c
index 06ffeee..14a143c 100644
--- a/drivers/pinctrl/pinctrl-baytrail.c
+++ b/drivers/pinctrl/pinctrl-baytrail.c
@@ -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)
--
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/