From: Martin Bugge Date: Thu, 5 Dec 2013 14:39:37 +0000 (-0300) Subject: [media] adv7842: save platform data in state struct X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7de5be44a523558b7b5330fba9d24e95a519c1ec;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [media] adv7842: save platform data in state struct Signed-off-by: Martin Bugge Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/i2c/adv7842.c b/drivers/media/i2c/adv7842.c index cbbfa774079d..4f93526e3b64 100644 --- a/drivers/media/i2c/adv7842.c +++ b/drivers/media/i2c/adv7842.c @@ -61,6 +61,7 @@ MODULE_LICENSE("GPL"); */ struct adv7842_state { + struct adv7842_platform_data pdata; struct v4l2_subdev sd; struct media_pad pad; struct v4l2_ctrl_handler hdl; @@ -2730,6 +2731,9 @@ static int adv7842_probe(struct i2c_client *client, return -ENOMEM; } + /* platform data */ + state->pdata = *pdata; + sd = &state->sd; v4l2_i2c_subdev_init(sd, client, &adv7842_ops); sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; @@ -2834,7 +2838,7 @@ static int adv7842_probe(struct i2c_client *client, if (err) goto err_work_queues; - err = adv7842_core_init(sd, pdata); + err = adv7842_core_init(sd); if (err) goto err_entity;