Ignore:
Timestamp:
2010-03-16T20:53:25+01:00 (7 years ago)
Author:
juhosg
Message:

ar71xx: fix semantics error in the ar71xx_gpio_get_value function.

  • Thanks to Pascal Dornier
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/gpio.c

    r20242 r20247  
    3939int __ar71xx_gpio_get_value(unsigned gpio) 
    4040{ 
    41         return !!(__raw_readl(ar71xx_gpio_base + GPIO_REG_IN) & (1 << gpio)); 
     41        return (__raw_readl(ar71xx_gpio_base + GPIO_REG_IN) >> gpio) & 1; 
    4242} 
    4343EXPORT_SYMBOL(__ar71xx_gpio_get_value); 
Note: See TracChangeset for help on using the changeset viewer.