https://github.com/torvalds/linux
Revision b8978784544e8b4e8fbacb558df8580957d4f8a5 authored by Ben Dooks on 18 August 2009, 21:11:16 UTC, committed by Linus Torvalds on 18 August 2009, 23:31:13 UTC
Currently the clock rate calculation may round as pleased, which means
that it is possible that we will round down and end up with a faster clock
rate than intended.

Change the calculation to use DIV_ROUND_UP() to ensure that we end up with
a clock rate either the same as or lower than the user requested one.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent b2503a9
History
Tip revision: b8978784544e8b4e8fbacb558df8580957d4f8a5 authored by Ben Dooks on 18 August 2009, 21:11:16 UTC
spi_s3c24xx: fix clock rate calculation
Tip revision: b897878
File Mode Size
Documentation
arch
block
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.gitignore -rw-r--r-- 952 bytes
.mailmap -rw-r--r-- 3.9 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 91.8 KB
Kbuild -rw-r--r-- 2.4 KB
MAINTAINERS -rw-r--r-- 148.6 KB
Makefile -rw-r--r-- 53.9 KB
README -rw-r--r-- 17.0 KB
REPORTING-BUGS -rw-r--r-- 3.1 KB

README

back to top