]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitc7a0c61b04d9628f2bfb6402c8d342bf6a75b153
tree636ec819180492fc6d6f2947e111fda26a35efde
parentc82a3907427434be004ce8d4c3d21afd17aac783
Blackfin: bfin_gpio: Use proper mask for comparing pfunc

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>
arch/blackfin/kernel/bfin_gpio.c