Skip to content

Commit

Permalink
MIPS: RB532: Fix set_latch_u5()
Browse files Browse the repository at this point in the history
The data to be written is just a byte, so use writeb instead of writel.
Also, dev3.base contains the address, not the data so referencing here
is wrong.

Signed-off-by: Phil Sutter <n0-1@freewrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
Phil Sutter authored and Ralf Baechle committed Jan 30, 2009
1 parent deb1003 commit 7060886
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/mips/rb532/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ void set_latch_u5(unsigned char or_mask, unsigned char nand_mask)
spin_lock_irqsave(&dev3.lock, flags);

dev3.state = (dev3.state | or_mask) & ~nand_mask;
writel(dev3.state, &dev3.base);
writeb(dev3.state, dev3.base);

spin_unlock_irqrestore(&dev3.lock, flags);
}
Expand Down

0 comments on commit 7060886

Please sign in to comment.