Author: stefanct
Date: Wed Mar 19 18:17:00 2014
New Revision: 1768
URL: http://flashrom.org/trac/flashrom/changeset/1768

Log:
linux_spi: Fix conversion from kHz to Hz.

A kilohertz is exactly 1000 hertz, not 1024 hertz.

Signed-off-by: Alexandru Gagniuc <[email protected]>
Acked-by: Stefan Tauner <[email protected]>

Modified:
   trunk/linux_spi.c

Modified: trunk/linux_spi.c
==============================================================================
--- trunk/linux_spi.c   Mon Mar 17 23:07:29 2014        (r1767)
+++ trunk/linux_spi.c   Wed Mar 19 18:17:00 2014        (r1768)
@@ -68,7 +68,7 @@
 
        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);

_______________________________________________
flashrom mailing list
[email protected]
http://www.flashrom.org/mailman/listinfo/flashrom

Reply via email to