]> git.baikalelectronics.ru Git - kernel.git/commit
spi/pl022: Fix calculate_effective_freq()
authorViresh Kumar <viresh.kumar@st.com>
Thu, 19 Apr 2012 09:14:21 +0000 (14:44 +0530)
committerGrant Likely <grant.likely@secretlab.ca>
Fri, 27 Apr 2012 16:47:51 +0000 (10:47 -0600)
commit35d5ef8dafc7fcb6404ff46302d5ed47b74f136b
tree0a5ecac4d4b8c729cefe70c6f406c17f274774db
parent62eb68bab021ef2e7e0b4b62e8b047071c27166c
spi/pl022: Fix calculate_effective_freq()

calculate_effective_freq() was still not optimized and there were cases when it
returned without error and with values of cpsr and scr as zero.

Also, the variable named found is not used well.

This patch targets to optimize and correct this routine. Tested for SPEAr.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Tested-by: Vinit Kamalaksha Shenoy <vinit.shenoy@st.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
drivers/spi/spi-pl022.c