diff options
author | Stefan Reinauer <reinauer@google.com> | 2017-08-14 15:06:55 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-08-16 17:48:05 -0700 |
commit | 63158e2ee67a906d0868fad4c65d04207b4e0427 (patch) | |
tree | 3be74c5e50728bd99c5f614b7aa7580eb3f71c7f /util/stm32mon.c | |
parent | 58374f7d266e7bbfaf52b33f497c408a718cf81e (diff) | |
download | chrome-ec-63158e2ee67a906d0868fad4c65d04207b4e0427.tar.gz |
st32mon: Define SPI_IOC_WR_MODE32 if it's missing
On Goobuntu, the uapi copy of spidev.h doesnot contain
SPI_IOC_WR_MODE32, however the kernel supports the IOCTL.
To be able to build the tool outside of the ChromeOS chroot,
define it if it's not available.
Signed-off-by: Stefan Reinauer <reinauer@google.com>
BRANCH=none
TEST=make buildall -j outside of the chroot
BUG=b:35567067
Change-Id: I04ec968e221c7d43f1bdb364a195d371370ec886
Reviewed-on: https://chromium-review.googlesource.com/614645
Commit-Ready: Stefan Reinauer <reinauer@google.com>
Tested-by: Stefan Reinauer <reinauer@google.com>
Reviewed-by: Martin Roth <martinroth@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'util/stm32mon.c')
-rw-r--r-- | util/stm32mon.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/util/stm32mon.c b/util/stm32mon.c index 3448c88f75..116c115d2d 100644 --- a/util/stm32mon.c +++ b/util/stm32mon.c @@ -32,6 +32,14 @@ #include <time.h> #include <unistd.h> +/* + * Some Ubuntu versions do not export SPI_IOC_WR_MODE32 even though + * the kernel shipped on those supports it. + */ +#ifndef SPI_IOC_WR_MODE32 +#define SPI_IOC_WR_MODE32 _IOW(SPI_IOC_MAGIC, 5, __u32) +#endif + /* Monitor command set */ #define CMD_INIT 0x7f /* Starts the monitor */ |