Commit d29806ff authored by Alexandru Gagniuc's avatar Alexandru Gagniuc Committed by Stefan Tauner
Browse files

linux_spi: Fix conversion from kHz to Hz


A kilohertz is exactly 1000 hertz, not 1024 hertz.

Corresponding to flashrom svn r1768.
Signed-off-by: default avatarAlexandru Gagniuc <mr.nuke.me@gmail.com>
Acked-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
parent bf8ea49c
......@@ -68,7 +68,7 @@ int linux_spi_init(void)
p = extract_programmer_param("spispeed");
if (p && strlen(p)) {
speed = (uint32_t)strtoul(p, &endp, 10) * 1024;
speed = (uint32_t)strtoul(p, &endp, 10) * 1000;
if (p == endp) {
msg_perr("%s: invalid clock: %s kHz\n", __func__, p);
free(p);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment