gpio: tps65910: Use correct offset for gpio initialization
[linux-2.6.git] / drivers / gpio / gpio-tps65910.c
index 4171033..91f45b9 100644 (file)
@@ -52,7 +52,7 @@ static int tps65910_gpio_output(struct gpio_chip *gc, unsigned offset,
        struct tps65910 *tps65910 = container_of(gc, struct tps65910, gpio);
 
        /* Set the initial value */
-       tps65910_gpio_set(gc, 0, value);
+       tps65910_gpio_set(gc, offset, value);
 
        return tps65910_set_bits(tps65910, TPS65910_GPIO0 + offset,
                                                GPIO_CFG_MASK);
@@ -81,8 +81,10 @@ void tps65910_gpio_init(struct tps65910 *tps65910, int gpio_base)
        switch(tps65910_chip_id(tps65910)) {
        case TPS65910:
                tps65910->gpio.ngpio    = 6;
+               break;
        case TPS65911:
                tps65910->gpio.ngpio    = 9;
+               break;
        default:
                return;
        }