summaryrefslogtreecommitdiff
path: root/drivers/iio
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2019-06-08 13:55:42 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2019-06-17 23:06:43 +0300
commitaa7093299253a8c4cb5bd0053ab9c8128beba5e4 (patch)
tree2b41d266b23f93cc0aee6bdf3b7824db7d7f23f6 /drivers/iio
parent3c23e9e8085308d7d960b920af145938a103ddc5 (diff)
downloadlinux-aa7093299253a8c4cb5bd0053ab9c8128beba5e4.tar.xz
iio: light: bh1780: simplify getting the adapter of a client
We have a dedicated pointer for that, so use it. Much easier to read and less computation involved. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio')
-rw-r--r--drivers/iio/light/bh1780.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/light/bh1780.c b/drivers/iio/light/bh1780.c
index 036f3bbe323c..4f823e9fab8e 100644
--- a/drivers/iio/light/bh1780.c
+++ b/drivers/iio/light/bh1780.c
@@ -145,7 +145,7 @@ static int bh1780_probe(struct i2c_client *client,
{
int ret;
struct bh1780_data *bh1780;
- struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent);
+ struct i2c_adapter *adapter = client->adapter;
struct iio_dev *indio_dev;
if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE))