forked from Mirrors/opensbi
		
	gpio/starfive: redundant readl() call
In starfive_gpio_direction_output() readl() is called twice to read the
gpio direction register. The result of the first read is discarded.
Remove the redundant read.
Fixes: 908be1b85c ("gpio/starfive: add gpio driver and support gpio reset")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
			
			
This commit is contained in:
		
				
					committed by
					
						
						Anup Patel
					
				
			
			
				
	
			
			
			
						parent
						
							f831b93357
						
					
				
				
					commit
					d891caeae9
				
			@@ -37,7 +37,6 @@ static int starfive_gpio_direction_output(struct gpio_pin *gp, int value)
 | 
			
		||||
	reg_addr = chip->addr + gp->offset;
 | 
			
		||||
	reg_addr &= ~(STARFIVE_GPIO_REG_SHIFT_MASK);
 | 
			
		||||
 | 
			
		||||
	val = readl((void *)(reg_addr));
 | 
			
		||||
	shift_bits = (gp->offset & STARFIVE_GPIO_REG_SHIFT_MASK)
 | 
			
		||||
		<< STARFIVE_GPIO_SHIFT_BITS;
 | 
			
		||||
	bit_mask = STARFIVE_GPIO_MASK << shift_bits;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user