diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2013-05-22 06:20:14 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2013-05-30 13:31:12 -0400 |
commit | 611a485b5fac3a6dce32a1ae6ddd3e0df215aecd (patch) | |
tree | 21772d07ab65ac43d31f46668cae7dd23b29fb88 /drivers/gpio | |
parent | 8aca119f561ddb51d407b26f5dacb4f4ce3b3364 (diff) |
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: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: David Cohen <david.a.cohen@intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/gpio-langwell.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/gpio/gpio-langwell.c b/drivers/gpio/gpio-langwell.c index 313d190c528d..fec85ca89c58 100644 --- a/drivers/gpio/gpio-langwell.c +++ b/drivers/gpio/gpio-langwell.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Moorestown platform Langwell chip GPIO driver | 2 | * Moorestown platform Langwell chip GPIO driver |
3 | * | 3 | * |
4 | * Copyright (c) 2008 - 2009, Intel Corporation. | 4 | * Copyright (c) 2008, 2009, 2013, Intel Corporation. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 as | 7 | * it under the terms of the GNU General Public License version 2 as |
@@ -74,15 +74,13 @@ struct lnw_gpio { | |||
74 | #define to_lnw_priv(chip) container_of(chip, struct lnw_gpio, chip) | 74 | #define to_lnw_priv(chip) container_of(chip, struct lnw_gpio, chip) |
75 | 75 | ||
76 | static void __iomem *gpio_reg(struct gpio_chip *chip, unsigned offset, | 76 | static void __iomem *gpio_reg(struct gpio_chip *chip, unsigned offset, |
77 | enum GPIO_REG reg_type) | 77 | enum GPIO_REG reg_type) |
78 | { | 78 | { |
79 | struct lnw_gpio *lnw = to_lnw_priv(chip); | 79 | struct lnw_gpio *lnw = to_lnw_priv(chip); |
80 | unsigned nreg = chip->ngpio / 32; | 80 | unsigned nreg = chip->ngpio / 32; |
81 | u8 reg = offset / 32; | 81 | u8 reg = offset / 32; |
82 | void __iomem *ptr; | ||
83 | 82 | ||
84 | ptr = (void __iomem *)(lnw->reg_base + reg_type * nreg * 4 + reg * 4); | 83 | return lnw->reg_base + reg_type * nreg * 4 + reg * 4; |
85 | return ptr; | ||
86 | } | 84 | } |
87 | 85 | ||
88 | static void __iomem *gpio_reg_2bit(struct gpio_chip *chip, unsigned offset, | 86 | 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 | struct lnw_gpio *lnw = to_lnw_priv(chip); | 89 | struct lnw_gpio *lnw = to_lnw_priv(chip); |
92 | unsigned nreg = chip->ngpio / 32; | 90 | unsigned nreg = chip->ngpio / 32; |
93 | u8 reg = offset / 16; | 91 | u8 reg = offset / 16; |
94 | void __iomem *ptr; | ||
95 | 92 | ||
96 | ptr = (void __iomem *)(lnw->reg_base + reg_type * nreg * 4 + reg * 4); | 93 | return lnw->reg_base + reg_type * nreg * 4 + reg * 4; |
97 | return ptr; | ||
98 | } | 94 | } |
99 | 95 | ||
100 | static int lnw_gpio_request(struct gpio_chip *chip, unsigned offset) | 96 | static int lnw_gpio_request(struct gpio_chip *chip, unsigned offset) |