From: Anton Vorontsov Date: Tue, 22 Sep 2009 23:45:16 +0000 (-0700) Subject: sdhci-of: cleanup eSDHC's set_clock() a little bit X-Git-Tag: v2.6.32-rc1~328 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ad1e597d4199ffcdee04b9fb402e45c5be6a5052;p=pandora-kernel.git sdhci-of: cleanup eSDHC's set_clock() a little bit - Get rid of incomprehensible "if { for { if } }" construction for the exponential divisor calculation. The first if statement isn't correct at all, since it should check for "host->max_clk / pre_div / 16 > clock". The error doesn't cause any bugs because the check in the for loop does the right thing, and so the outer check becomes useless; - For the linear divisor do the same: a single while statement is more readable than for + if construction; - Add dev_dbg() that prints desired and actual clock frequency. Signed-off-by: Anton Vorontsov Cc: Pierre Ossman Cc: Kumar Gala Cc: David Vrabel Cc: Ben Dooks Cc: Sascha Hauer Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed