diff options
author | Michael Tretter <m.tretter@pengutronix.de> | 2016-12-19 15:19:59 +0100 |
---|---|---|
committer | Marco Felsch <m.felsch@pengutronix.de> | 2019-08-19 16:09:11 +0200 |
commit | 5703cf6563d1531b19e868d384077a7d8917ce0e (patch) | |
tree | 2ec5e31a5c854c18b4f6305912367a3967f7cea1 /drivers/media | |
parent | b6a14693c13cb77d63e38f6c40c4688e6b228841 (diff) | |
download | linux-0-day-5703cf6563d1531b19e868d384077a7d8917ce0e.tar.gz linux-0-day-5703cf6563d1531b19e868d384077a7d8917ce0e.tar.xz |
media: tvp5150: initialize subdev before parsing device tree
There are several debug prints in the tvp5150_parse_dt() function, which
do not print the prefix, because the v4l2_subdev is not initialized, yet.
Initialize the v4l2_subdev before parsing the device tree to fix the
debug messages.
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/i2c/tvp5150.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/media/i2c/tvp5150.c b/drivers/media/i2c/tvp5150.c index b55add82286bf..cad7a151348b9 100644 --- a/drivers/media/i2c/tvp5150.c +++ b/drivers/media/i2c/tvp5150.c @@ -1951,6 +1951,9 @@ static int tvp5150_probe(struct i2c_client *c) core->regmap = map; sd = &core->sd; + v4l2_i2c_subdev_init(sd, c, &tvp5150_ops); + sd->internal_ops = &tvp5150_internal_ops; + sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; if (IS_ENABLED(CONFIG_OF) && np) { res = tvp5150_parse_dt(core, np); @@ -1963,10 +1966,6 @@ static int tvp5150_probe(struct i2c_client *c) core->mbus_type = V4L2_MBUS_BT656; } - v4l2_i2c_subdev_init(sd, c, &tvp5150_ops); - sd->internal_ops = &tvp5150_internal_ops; - sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; - res = tvp5150_mc_init(core); if (res) return res; |