diff options
author | David Riley <davidriley@chromium.org> | 2014-08-05 22:16:01 +0000 |
---|---|---|
committer | Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> | 2014-08-05 22:16:01 +0000 |
commit | 18f509780a3eb76ffe31b4bfc24016c408dec537 (patch) | |
tree | a302ee3839d61da639b806e99b7aa7c9ec2fb43a /flashchips.c | |
parent | 03a9c3c1bbfd1548888ff6386c30165efc4c7c00 (diff) | |
download | flashrom-18f509780a3eb76ffe31b4bfc24016c408dec537.tar.gz flashrom-18f509780a3eb76ffe31b4bfc24016c408dec537.tar.bz2 flashrom-18f509780a3eb76ffe31b4bfc24016c408dec537.zip |
linux_spi: properly convert pointers to kernel's u64
For arm64 with 32-bit userspace, pointers such as 0xff96ebf8 were
incorrectly getting converted to u64_t 0xffffffffff96ebf8 in the
spi_ioc_transfer struct which was causing ioctl()s to be rejected by
the kernel. With this patch we first cast to uintptr_t (to avoid
warnings on architectures where char * are not 64b wide) and then to
uint64_t which is always big enough and does not produce warnings.
This patch is taken from ChromiumOS'
Change-Id: I5a15b4ca5d9657c3cb1ddccd42eafd91c852dd26
Corresponding to flashrom svn r1836.
Signed-off-by: David Riley <davidriley@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Diffstat (limited to 'flashchips.c')
0 files changed, 0 insertions, 0 deletions