Commit 7de5be44 authored by Martin Bugge's avatar Martin Bugge Committed by Mauro Carvalho Chehab

[media] adv7842: save platform data in state struct

Signed-off-by: default avatarMartin Bugge <marbugge@cisco.com>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent c9f1f271
...@@ -61,6 +61,7 @@ MODULE_LICENSE("GPL"); ...@@ -61,6 +61,7 @@ MODULE_LICENSE("GPL");
*/ */
struct adv7842_state { struct adv7842_state {
struct adv7842_platform_data pdata;
struct v4l2_subdev sd; struct v4l2_subdev sd;
struct media_pad pad; struct media_pad pad;
struct v4l2_ctrl_handler hdl; struct v4l2_ctrl_handler hdl;
...@@ -2730,6 +2731,9 @@ static int adv7842_probe(struct i2c_client *client, ...@@ -2730,6 +2731,9 @@ static int adv7842_probe(struct i2c_client *client,
return -ENOMEM; return -ENOMEM;
} }
/* platform data */
state->pdata = *pdata;
sd = &state->sd; sd = &state->sd;
v4l2_i2c_subdev_init(sd, client, &adv7842_ops); v4l2_i2c_subdev_init(sd, client, &adv7842_ops);
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
...@@ -2834,7 +2838,7 @@ static int adv7842_probe(struct i2c_client *client, ...@@ -2834,7 +2838,7 @@ static int adv7842_probe(struct i2c_client *client,
if (err) if (err)
goto err_work_queues; goto err_work_queues;
err = adv7842_core_init(sd, pdata); err = adv7842_core_init(sd);
if (err) if (err)
goto err_entity; goto err_entity;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment