lkml.org 
[lkml]   [2012]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 14/21] gpio: ab8500: Remove ENUMs from linux/mfd/abx500/ab8500-gpio.h
Date
These are no longer used and will be replaced by a simple macro.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/gpio/gpio-ab8500.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/gpio/gpio-ab8500.c b/drivers/gpio/gpio-ab8500.c
index 200c605..ab6ceac 100644
--- a/drivers/gpio/gpio-ab8500.c
+++ b/drivers/gpio/gpio-ab8500.c
@@ -585,9 +585,9 @@ static int __devexit ab8500_gpio_remove(struct platform_device *pdev)
}

int ab8500_config_pulldown(struct device *dev,
- enum ab8500_pin gpio, bool enable)
+ int gpio, bool enable)
{
- u8 offset = gpio - AB8500_PIN_GPIO1;
+ u8 offset = gpio - AB8500_PIN_GPIO(1);
u8 pos = offset % 8;
u8 val = enable ? 0 : 1;
u8 reg = AB8500_GPIO_PUD1_REG + (offset / 8);
@@ -610,9 +610,9 @@ EXPORT_SYMBOL(ab8500_config_pulldown);
* @gpio_select: true if the pin should be used as GPIO
*/
int ab8500_gpio_config_select(struct device *dev,
- enum ab8500_pin gpio, bool gpio_select)
+ int gpio, bool gpio_select)
{
- u8 offset = gpio - AB8500_PIN_GPIO1;
+ u8 offset = gpio - AB8500_PIN_GPIO(1);
u8 reg = AB8500_GPIO_SEL1_REG + (offset / 8);
u8 pos = offset % 8;
u8 val = gpio_select ? 1 : 0;
@@ -638,9 +638,9 @@ int ab8500_gpio_config_select(struct device *dev,
* @gpio_select: pointer to pin selection status
*/
int ab8500_gpio_config_get_select(struct device *dev,
- enum ab8500_pin gpio, bool *gpio_select)
+ int gpio, bool *gpio_select)
{
- u8 offset = gpio - AB8500_PIN_GPIO1;
+ u8 offset = gpio - AB8500_PIN_GPIO(1);
u8 reg = AB8500_GPIO_SEL1_REG + (offset / 8);
u8 pos = offset % 8;
u8 val;
--
1.7.9.5


\
 
 \ /
  Last update: 2012-12-14 18:43    [W:0.105 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site