]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: sdhci-s3c: Use shifts to divide by powers of two
authorTomasz Figa <tomasz.figa@gmail.com>
Sat, 11 Jan 2014 21:39:01 +0000 (22:39 +0100)
committerChris Ball <chris@printf.net>
Mon, 3 Mar 2014 15:21:32 +0000 (10:21 -0500)
commit934718080080ea4d76c5f00e27f602a015558a5d
tree7f83dbbb7f54132ae75d30bda5359ef3808f9107
parent7ff077f7a95a5b4766437ab414d3ee52d2a98984
mmc: sdhci-s3c: Use shifts to divide by powers of two

Current implementation of sdhci_s3c_consider_clock() is highly
inefficient due to multiple integer divisions by variable performed in a
loop. Since only divisors that are powers of two are considered, this
patch replaces them with respective shifts, removing all the integer
divisions.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Jaehoon Chung <jh80.chung@samsung.com>
Acked-by; Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Chris Ball <chris@printf.net>
drivers/mmc/host/sdhci-s3c.c