Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 130564
b: refs/heads/master
c: 5379a5f
h: refs/heads/master
v: v3
  • Loading branch information
Phil Sutter authored and Ralf Baechle committed Jan 30, 2009
1 parent 65a8ae6 commit de32550
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f839490ab42a471f0b0a4b795df77a1af924fe05
refs/heads/master: 5379a5fdf3cb2b23d00da2a1298167f9a1fb002a
6 changes: 2 additions & 4 deletions trunk/arch/mips/rb532/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,11 @@ static inline void rb532_set_bit(unsigned bitval,
unsigned long flags;
u32 val;

bitval = !!bitval; /* map parameter to {0,1} */

local_irq_save(flags);

val = readl(ioaddr);
val &= ~( ~bitval << offset ); /* unset bit if bitval == 0 */
val |= ( bitval << offset ); /* set bit if bitval == 1 */
val &= ~(!bitval << offset); /* unset bit if bitval == 0 */
val |= (!!bitval << offset); /* set bit if bitval == 1 */
writel(val, ioaddr);

local_irq_restore(flags);
Expand Down

0 comments on commit de32550

Please sign in to comment.