aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorWolfram Sang2019-06-08 12:55:42 +0200
committerJonathan Cameron2019-06-17 21:06:43 +0100
commitaa7093299253a8c4cb5bd0053ab9c8128beba5e4 (patch)
tree2b41d266b23f93cc0aee6bdf3b7824db7d7f23f6 /drivers
parent3c23e9e8085308d7d960b920af145938a103ddc5 (diff)
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')
-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))