diff options
author | Arnd Bergmann <arnd@arndb.de> | 2011-10-08 21:43:22 +0200 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2011-10-08 21:43:22 +0200 |
commit | 32d80f97fe4a86b7e9de5d13030432de115119b1 (patch) | |
tree | 54b95741024e8926348fa15d43579d49f4743553 /drivers/misc | |
parent | 3a3ad60176fafb027bf2e4fe4793eab99ced5708 (diff) | |
parent | 100aafc992039794d0facb0e7bbd02f8a11fd1d6 (diff) | |
download | op-kernel-dev-32d80f97fe4a86b7e9de5d13030432de115119b1.zip op-kernel-dev-32d80f97fe4a86b7e9de5d13030432de115119b1.tar.gz |
Merge branch 'imx/fixes' into next/fixes
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/lis3lv02d/lis3lv02d.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/misc/lis3lv02d/lis3lv02d.c b/drivers/misc/lis3lv02d/lis3lv02d.c index b928bc1..8b51cd6 100644 --- a/drivers/misc/lis3lv02d/lis3lv02d.c +++ b/drivers/misc/lis3lv02d/lis3lv02d.c @@ -375,12 +375,14 @@ void lis3lv02d_poweron(struct lis3lv02d *lis3) * both have been read. So the value read will always be correct. * Set BOOT bit to refresh factory tuning values. */ - lis3->read(lis3, CTRL_REG2, ®); - if (lis3->whoami == WAI_12B) - reg |= CTRL2_BDU | CTRL2_BOOT; - else - reg |= CTRL2_BOOT_8B; - lis3->write(lis3, CTRL_REG2, reg); + if (lis3->pdata) { + lis3->read(lis3, CTRL_REG2, ®); + if (lis3->whoami == WAI_12B) + reg |= CTRL2_BDU | CTRL2_BOOT; + else + reg |= CTRL2_BOOT_8B; + lis3->write(lis3, CTRL_REG2, reg); + } /* LIS3 power on delay is quite long */ msleep(lis3->pwron_delay / lis3lv02d_get_odr()); |