drivers: iio: imu: fix initial screen offset when switch app

Change-Id: Ia65b4b5e03b712d0c69546d69ea7b4364f30b05b
Signed-off-by: lanshh <lsh@rock-chips.com>
This commit is contained in:
lanshh
2016-09-26 16:14:08 +08:00
committed by Huang, Tao
parent 087633170d
commit 245ae3931a

View File

@@ -1226,6 +1226,12 @@ static int inv_proc_event(char *raw_data, size_t raw_len, void *priv)
pr_info("in:%s\n", hex);
}
#endif
if (st->chip_config.is_asleep)
return 0;
if (raw_data[1] == 0)
return 0;
p = raw_data + 6;
st->hid_temperature = (p[1] << 8) | p[0];
p = raw_data + 8;