summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2019-06-08 06:55:49 -0400
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-06-24 11:16:14 -0400
commite64de2082dab5e0ca51f7dbe83029f0d7b5b3d34 (patch)
treed5e5be470db34ec21acaa83efb23c0486210c7af /drivers/media/i2c
parent54ed1c182ed28b09683240fe7ebff3000107d956 (diff)
downloadlinux-e64de2082dab5e0ca51f7dbe83029f0d7b5b3d34.tar.gz
linux-e64de2082dab5e0ca51f7dbe83029f0d7b5b3d34.tar.bz2
linux-e64de2082dab5e0ca51f7dbe83029f0d7b5b3d34.zip
media: i2c: ov2640: 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/ov2640.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/i2c/ov2640.c b/drivers/media/i2c/ov2640.c
index 83031cfc7914..30e7e6b2b293 100644
--- a/drivers/media/i2c/ov2640.c
+++ b/drivers/media/i2c/ov2640.c
@@ -1197,7 +1197,7 @@ static int ov2640_probe(struct i2c_client *client,
const struct i2c_device_id *did)
{
struct ov2640_priv *priv;
- 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_BYTE_DATA)) {