Changeset 18038


Ignore:
Timestamp:
12/22/11 15:00:11 (17 months ago)
Author:
BrainSlayer
Message:

fix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/linux/pb42/linux-2.6.34.6/arch/mips/ar7240/gpio_driver.c

    r18037 r18038  
    7070        unsigned long flags; 
    7171        if (offset>=32) 
     72            return 0; 
     73 
     74        spin_lock_irqsave(&ar71xx_gpio_lock, flags); 
     75 
     76        __raw_writel(__raw_readl(base + GPIO_REG_OE) & ~(1 << offset), 
     77                     base + GPIO_REG_OE); 
     78 
     79        spin_unlock_irqrestore(&ar71xx_gpio_lock, flags); 
     80 
     81        return 0; 
     82} 
     83 
     84static int ar71xx_gpio_direction_output(struct gpio_chip *chip, 
     85                                        unsigned offset, int value) 
     86{ 
     87        void __iomem *base = ar71xx_gpio_base; 
     88        unsigned long flags; 
     89        if (offset>=32) 
    7290            { 
    7391            set_wl0_gpio(offset-32,value); 
    7492            return 0; 
    7593            } 
    76  
    77         spin_lock_irqsave(&ar71xx_gpio_lock, flags); 
    78  
    79         __raw_writel(__raw_readl(base + GPIO_REG_OE) & ~(1 << offset), 
    80                      base + GPIO_REG_OE); 
    81  
    82         spin_unlock_irqrestore(&ar71xx_gpio_lock, flags); 
    83  
    84         return 0; 
    85 } 
    86  
    87 static int ar71xx_gpio_direction_output(struct gpio_chip *chip, 
    88                                         unsigned offset, int value) 
    89 { 
    90         void __iomem *base = ar71xx_gpio_base; 
    91         unsigned long flags; 
    92         if (offset>=32) 
    93             return 0; 
    9494 
    9595        spin_lock_irqsave(&ar71xx_gpio_lock, flags); 
Note: See TracChangeset for help on using the changeset viewer.