Blackfin: bfin_gpio: Use proper mask for comparing pfunc
authorSonic Zhang <sonic.zhang@analog.com>
Mon, 1 Jul 2013 03:24:46 +0000 (11:24 +0800)
committerSteven Miao <realmz6@gmail.com>
Fri, 15 Nov 2013 09:33:41 +0000 (17:33 +0800)
For BF537_FAMILY, when offset != 1, the mask is 1.
Thus add proper mask for comparing pfunc with function.

Also has small refactor for better readability.
In portmux_setup(), it looks odd having "pmux &= ~(3 << 1);"
while in current code we do pmux |= (function << offset);.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>

No differences found