diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2019-01-09 18:07:07 -0800 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2019-01-10 19:01:25 +0000 |
commit | 932cd8039bcb20f5dd2b257f4382b7c2f32442f5 (patch) | |
tree | 9ec59af6c6d621d3d75e4a15ee1513e23b108332 | |
parent | 4b72e2d82c27beae0536bec84bef2a7e5b541b5e (diff) | |
download | chrome-ec-932cd8039bcb20f5dd2b257f4382b7c2f32442f5.tar.gz |
ectool: fix battery commandstabilize-11316.82.Bstabilize-11316.76.B
This patch fixes the ec_readmem function pointer, which is currently
set to fake_readmem unconditionally.
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
BUG=b/122568808
BRANCH=none
TEST=Verify 'ectool battery' runs successfully on Nami.
Change-Id: I2d57d0ca7103d9b9a1e44e685bc966d158a16a47
Reviewed-on: https://chromium-review.googlesource.com/c/1405068
Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
-rw-r--r-- | util/comm-host.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/util/comm-host.c b/util/comm-host.c index e9e7fb1f5f..f8be25294c 100644 --- a/util/comm-host.c +++ b/util/comm-host.c @@ -84,6 +84,9 @@ int ec_command(int command, int version, int comm_init_alt(int interfaces, const char *device_name) { + /* Default memmap access */ + ec_readmem = fake_readmem; + if ((interfaces & COMM_SERVO) && comm_init_servo_spi && !comm_init_servo_spi(device_name)) return 0; @@ -110,9 +113,6 @@ int comm_init_buffer(void) int allow_large_buffer; struct ec_response_get_protocol_info info; - /* Default memmap access */ - ec_readmem = fake_readmem; - allow_large_buffer = kernel_version_ge(3, 14, 0); if (allow_large_buffer < 0) { fprintf(stderr, "Unable to check linux version\n"); |