Commit 611a485b authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Linus Walleij

gpio-langwell: drop away explicit casting

Since the type of the reg_base member is void __iomem * we don't need to have
explicit casting in gpio_reg() and gpio_reg_2bit().

Update year in the copyright notice as well.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: default avatarDavid Cohen <david.a.cohen@intel.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 8aca119f
/* /*
* Moorestown platform Langwell chip GPIO driver * Moorestown platform Langwell chip GPIO driver
* *
* Copyright (c) 2008 - 2009, Intel Corporation. * Copyright (c) 2008, 2009, 2013, Intel Corporation.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as * it under the terms of the GNU General Public License version 2 as
...@@ -74,15 +74,13 @@ struct lnw_gpio { ...@@ -74,15 +74,13 @@ struct lnw_gpio {
#define to_lnw_priv(chip) container_of(chip, struct lnw_gpio, chip) #define to_lnw_priv(chip) container_of(chip, struct lnw_gpio, chip)
static void __iomem *gpio_reg(struct gpio_chip *chip, unsigned offset, static void __iomem *gpio_reg(struct gpio_chip *chip, unsigned offset,
enum GPIO_REG reg_type) enum GPIO_REG reg_type)
{ {
struct lnw_gpio *lnw = to_lnw_priv(chip); struct lnw_gpio *lnw = to_lnw_priv(chip);
unsigned nreg = chip->ngpio / 32; unsigned nreg = chip->ngpio / 32;
u8 reg = offset / 32; u8 reg = offset / 32;
void __iomem *ptr;
ptr = (void __iomem *)(lnw->reg_base + reg_type * nreg * 4 + reg * 4); return lnw->reg_base + reg_type * nreg * 4 + reg * 4;
return ptr;
} }
static void __iomem *gpio_reg_2bit(struct gpio_chip *chip, unsigned offset, static void __iomem *gpio_reg_2bit(struct gpio_chip *chip, unsigned offset,
...@@ -91,10 +89,8 @@ static void __iomem *gpio_reg_2bit(struct gpio_chip *chip, unsigned offset, ...@@ -91,10 +89,8 @@ static void __iomem *gpio_reg_2bit(struct gpio_chip *chip, unsigned offset,
struct lnw_gpio *lnw = to_lnw_priv(chip); struct lnw_gpio *lnw = to_lnw_priv(chip);
unsigned nreg = chip->ngpio / 32; unsigned nreg = chip->ngpio / 32;
u8 reg = offset / 16; u8 reg = offset / 16;
void __iomem *ptr;
ptr = (void __iomem *)(lnw->reg_base + reg_type * nreg * 4 + reg * 4); return lnw->reg_base + reg_type * nreg * 4 + reg * 4;
return ptr;
} }
static int lnw_gpio_request(struct gpio_chip *chip, unsigned offset) static int lnw_gpio_request(struct gpio_chip *chip, unsigned offset)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment