mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-18 00:24:58 +08:00
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>
This commit is contained in:
parent
1583449ef7
commit
9c5b655795
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user