From ce2153b7fe91699b26c9a679d6c5670b7b2a4545 Mon Sep 17 00:00:00 2001 From: Oliver O'Halloran Date: Thu, 20 Jul 2017 12:13:03 +1000 Subject: hdat/i2c: Fix array version check We should be checking the array version, not the HDIF header version. Signed-off-by: Oliver O'Halloran Signed-off-by: Stewart Smith --- hdata/i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hdata') diff --git a/hdata/i2c.c b/hdata/i2c.c index 62933e6..1c26e2e 100644 --- a/hdata/i2c.c +++ b/hdata/i2c.c @@ -190,7 +190,7 @@ int parse_i2c_devs(const struct HDIF_common_hdr *hdr, int idata_index, version = 1; prerror("I2C: HDAT device array has no version! Assuming v1\n"); } else { - version = be32_to_cpu(hdr->version); + version = be32_to_cpu(ahdr->version); } if (version != 1) { -- cgit v1.1