blob: 16b56d4730315872fecbfd3180c3bc3ebde0ec8e [file] [log] [blame]
From ec071effb28fc43951e59dadc140e2fd28625710 Mon Sep 17 00:00:00 2001
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: Wed, 10 Jul 2013 14:55:38 +0300
Subject: pinctrl-baytrail: remove redundant ptr variable
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>
(cherry picked from commit 9c5b65579597609844ae248a6e76f614f02e3c42)
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
---
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 f3d305312663..71fa88754718 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.5.rc3