From: Wolfram Sang Date: Sat, 8 Jun 2019 10:55:45 +0000 (-0400) Subject: media: i2c: ak881x: simplify getting the adapter of a client X-Git-Tag: v5.3-rc1~170^2~76 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=5197051fdf4da4962837c4ec6d90d27dab8f2fa6;p=linux.git media: i2c: ak881x: 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 Reviewed-by: Simon Horman Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/i2c/ak881x.c b/drivers/media/i2c/ak881x.c index 30f9db1351b9..09860603da64 100644 --- a/drivers/media/i2c/ak881x.c +++ b/drivers/media/i2c/ak881x.c @@ -232,7 +232,7 @@ static const struct v4l2_subdev_ops ak881x_subdev_ops = { static int ak881x_probe(struct i2c_client *client, const struct i2c_device_id *did) { - struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent); + struct i2c_adapter *adapter = client->adapter; struct ak881x *ak881x; u8 ifmode, data;