]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
OMAP: Store switch state for OUTPUT gpio-switches
authorMikko Ylinen <mikko.k.ylinen@nokia.com>
Mon, 30 Jun 2008 13:32:54 +0000 (16:32 +0300)
committerTony Lindgren <tony@atomide.com>
Thu, 3 Jul 2008 10:19:40 +0000 (13:19 +0300)
Signed-off-by: Mikko Ylinen <mikko.k.ylinen@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/plat-omap/gpio-switch.c

index cd96c00ff4ad798b3662c3e96bc5acd6b6a2c204..7a61d0e185a9e7d5ec22615f1a025e6832630762 100644 (file)
@@ -131,11 +131,12 @@ static ssize_t gpio_sw_state_store(struct device *dev,
 
        str = get_sw_str(sw);
        if (strcmp(state, str[0]) == 0)
-               enable = 0;
+               sw->state = enable = 0;
        else if (strcmp(state, str[1]) == 0)
-               enable = 1;
+               sw->state = enable = 1;
        else
                return -EINVAL;
+
        if (sw->flags & OMAP_GPIO_SWITCH_FLAG_INVERTED)
                enable = !enable;
        omap_set_gpio_dataout(sw->gpio, enable);