]> git.baikalelectronics.ru Git - kernel.git/commit
spi/bcm63xx: fix clock configuration selection
authorFlorian Fainelli <florian@openwrt.org>
Mon, 23 Jul 2012 12:44:36 +0000 (14:44 +0200)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 23 Jul 2012 13:14:11 +0000 (14:14 +0100)
commitcc3e7ec7dddb4a3ae2fa02618f5a1b2b85f10a47
treef508efb5d6538ac20f55086ead926b43f4ad7c99
parentf89decfa25754bebc0ff5e907e2b2ec60df8b6a7
spi/bcm63xx: fix clock configuration selection

We are currently using an inferior or equal operator for comparing
the transfer frequency with the clock frequency table. Because of
this, we always end up selecting 20Mhz as a frequency, due to the
inequality transfer hz <= 20 Mhz being always true. Fix this by
reversing the inequality, which is how the comparison should be done.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/spi/spi-bcm63xx.c