gpio: bcm281xx: Fix return value of bcm_kona_gpio_get()
We need to return the corresponding bit for a particular GPIO. This bit contains shift not mask. Signed-off-by: Markus Mayer <markus.mayer@linaro.org> Reviewed-by: Tim Kryger <tim.kryger@linaro.org> Reviewed-by: Matt Porter <matt.porter@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
		
					parent
					
						
							
								2ba3154d9c
							
						
					
				
			
			
				commit
				
					
						e2f0b00560
					
				
			
		
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -158,7 +158,7 @@ static int bcm_kona_gpio_get(struct gpio_chip *chip, unsigned gpio)
 | 
			
		|||
	spin_unlock_irqrestore(&kona_gpio->lock, flags);
 | 
			
		||||
 | 
			
		||||
	/* return the specified bit status */
 | 
			
		||||
	return !!(val & bit);
 | 
			
		||||
	return !!(val & BIT(bit));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static int bcm_kona_gpio_direction_input(struct gpio_chip *chip, unsigned gpio)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue