diff options
author | Oliver O'Halloran <oohall@gmail.com> | 2017-07-20 12:13:03 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-07-25 15:41:07 +1000 |
commit | ce2153b7fe91699b26c9a679d6c5670b7b2a4545 (patch) | |
tree | 573c315c00332f553b1e41681159e688903b8a58 /hdata | |
parent | 6430a7e98273b106925dbf6bc1c15e052cf72c5f (diff) | |
download | skiboot-ce2153b7fe91699b26c9a679d6c5670b7b2a4545.zip skiboot-ce2153b7fe91699b26c9a679d6c5670b7b2a4545.tar.gz skiboot-ce2153b7fe91699b26c9a679d6c5670b7b2a4545.tar.bz2 |
hdat/i2c: Fix array version check
We should be checking the array version, not the HDIF header version.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hdata')
-rw-r--r-- | hdata/i2c.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) { |