summaryrefslogtreecommitdiff
path: root/util/iteflash.c
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2019-03-15 15:53:29 -0700
committerchrome-bot <chrome-bot@chromium.org>2019-03-21 03:31:47 -0700
commit2e9cabf0d290238b8b1149b1fcf5c6585b8ec574 (patch)
tree596368479d5bcaa3bd2e0a632fbaa2a15862c607 /util/iteflash.c
parentc97c7a71d6dbaaacce7d9153800c3e7f6e0b5474 (diff)
downloadchrome-ec-2e9cabf0d290238b8b1149b1fcf5c6585b8ec574.tar.gz
iteflash: restore ability to build outside chroot
It looks like ftdi library API is different outside chrtoot, in particular, some parameter pointers are not expected to be const. This patch restores the ability to build ec utils outside chroot. BRANCH=none BUG=none TEST=manual make BOARD=host utils succeeds both inside and outside chroot. Change-Id: I9d470df692821c095b9fab8186cb9dea384e3ad9 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1526488 Reviewed-by: Matthew Blecker <matthewb@chromium.org>
Diffstat (limited to 'util/iteflash.c')
-rw-r--r--util/iteflash.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/iteflash.c b/util/iteflash.c
index f895a56168..cc275d630c 100644
--- a/util/iteflash.c
+++ b/util/iteflash.c
@@ -753,7 +753,7 @@ static int ftdi_config_i2c(struct ftdi_context *ftdi)
int ret;
static const uint16_t divisor =
60000000 / (2 * FTDI_I2C_FREQ * 3 / 2 /* 3-phase CLK */) - 1;
- static const uint8_t clock_buf[] = {
+ uint8_t clock_buf[] = {
EN_3_PHASE,
DIS_DIV_5,
TCK_DIVISOR,
@@ -856,7 +856,7 @@ static int ftdi_send_special_waveform(struct common_hnd *chnd)
int i;
uint64_t *wave;
struct ftdi_context *ftdi = chnd->ftdi_hnd;
- static const uint8_t release_lines[] = {SET_BITS_LOW, 0, 0};
+ uint8_t release_lines[] = {SET_BITS_LOW, 0, 0};
wave = malloc(SPECIAL_BUFFER_SIZE);
if (!wave) {