diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2019-06-08 12:55:47 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-06-24 17:13:57 +0200 |
commit | 54ed1c182ed28b09683240fe7ebff3000107d956 (patch) | |
tree | 1cd9023e7f0e1240ca1dabd40d1d94a90822a22b /drivers/media/i2c | |
parent | media: i2c: mt9m001: simplify getting the adapter of a client (diff) | |
download | linux-54ed1c182ed28b09683240fe7ebff3000107d956.tar.xz linux-54ed1c182ed28b09683240fe7ebff3000107d956.zip |
media: i2c: mt9m111: 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>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r-- | drivers/media/i2c/mt9m111.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/i2c/mt9m111.c b/drivers/media/i2c/mt9m111.c index 593ebe5e2cb6..bd3a51c3b081 100644 --- a/drivers/media/i2c/mt9m111.c +++ b/drivers/media/i2c/mt9m111.c @@ -1250,7 +1250,7 @@ static int mt9m111_probe(struct i2c_client *client, const struct i2c_device_id *did) { struct mt9m111 *mt9m111; - struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent); + struct i2c_adapter *adapter = client->adapter; int ret; if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_WORD_DATA)) { |