From 361fff778b7c4d2c78f28833415335148d86a1aa Mon Sep 17 00:00:00 2001 From: merge Date: Fri, 5 Dec 2008 09:59:34 +0000 Subject: MERGE-via-pending-tracking-hist-MERGE-via-stable-tracking-build-fix-path-to-toolchain-on-1228470136 pending-tracking-hist top was MERGE-via-stable-tracking-build-fix-path-to-toolchain-on-1228470136 / 21b67ab8e79998b0a534263282dab1dda0f11b00 ... parent commitmessage: From: merge MERGE-via-stable-tracking-hist-build-fix-path-to-toolchain-on stable-tracking-hist top was build-fix-path-to-toolchain-on / ca14ba894df9b28822066c578dde48d7dbe931de ... parent commitmessage: From: Andy Green build-fix-path-to-toolchain-one-at-last.patch Signed-off-by: Andy Green --- drivers/mfd/pcf50633-gpio.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'drivers/mfd/pcf50633-gpio.c') diff --git a/drivers/mfd/pcf50633-gpio.c b/drivers/mfd/pcf50633-gpio.c index a7117fa6282..55139071d22 100644 --- a/drivers/mfd/pcf50633-gpio.c +++ b/drivers/mfd/pcf50633-gpio.c @@ -42,7 +42,7 @@ int pcf50633_gpio_get(struct pcf50633 *pcf, int gpio) u8 reg, val; reg = gpio - PCF50633_GPIO1 + PCF50633_REG_GPIO1CFG; - val = pcf50633_reg_read(pcf, reg); + val = pcf50633_reg_read(pcf, reg) & 0x07; return val; } @@ -55,7 +55,7 @@ void pcf50633_gpio_invert_set(struct pcf50633 *pcf, int gpio, int invert) reg = gpio - PCF50633_GPIO1 + PCF50633_REG_GPIO1CFG; val = !!invert << 3; - pcf50633_reg_set_bit_mask(pcf, reg, val, val); + pcf50633_reg_set_bit_mask(pcf, reg, 1 << 3, val); } EXPORT_SYMBOL_GPL(pcf50633_gpio_invert_set); @@ -87,13 +87,14 @@ static const u8 pcf50633_regulator_registers[PCF50633_NUM_REGULATORS] = { void pcf50633_gpio_power_supply_set(struct pcf50633 *pcf, int gpio, int regulator, int on) { - u8 reg, val; + u8 reg, val, mask; /* the *ENA register is always one after the *OUT register */ reg = pcf50633_regulator_registers[regulator] + 1; val = (!!on << (gpio - PCF50633_GPIO1)); + mask = (1 << (gpio - PCF50633_GPIO1)); - pcf50633_reg_set_bit_mask(pcf, reg, val, val); + pcf50633_reg_set_bit_mask(pcf, reg, mask, val); } EXPORT_SYMBOL_GPL(pcf50633_gpio_power_supply_set); -- cgit v1.2.3