]> git.baikalelectronics.ru Git - kernel.git/commit
iio: bh1780: dereference the client properly
authorLinus Walleij <linus.walleij@linaro.org>
Wed, 25 May 2016 07:40:26 +0000 (09:40 +0200)
committerJonathan Cameron <jic23@kernel.org>
Sun, 29 May 2016 18:50:56 +0000 (19:50 +0100)
commitb862f531b7dd20fe24f9eb3d628d7744246020a2
treedd35e04a7bcf46282005fb10cc87634974d53e9b
parente956cfe0be99d1e35840cd11e5a21646a112dc9f
iio: bh1780: dereference the client properly

The code in runtime_[suspend|resume] was assuming that the
i2c client data was the bh1780 state container, but it contains
the IIO device. So first dereference the IIO device from the
i2c client, then get the state container using the iio_priv()
call.

Fixes: 303cb952ae39 ("iio: light: new driver for the ROHM BH1780")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/light/bh1780.c