Skip to content

Commit

Permalink
[media] tc358743: only queue subdev notifications if devnode is set
Browse files Browse the repository at this point in the history
Hardware interrupts are enabled in the probe function, before the subdev
is registered to its v4l2_device. Until v4l2_device_register_subdev_node
is called, sd->devnode is NULL and v4l2_subdev_notify_event must not be
called.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
  • Loading branch information
Philipp Zabel authored and Mauro Carvalho Chehab committed Sep 3, 2015
1 parent 22dbe35 commit abeaca0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/media/i2c/tc358743.c
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,8 @@ static void tc358743_format_change(struct v4l2_subdev *sd)
&timings, false);
}

v4l2_subdev_notify_event(sd, &tc358743_ev_fmt);
if (sd->devnode)
v4l2_subdev_notify_event(sd, &tc358743_ev_fmt);
}

static void tc358743_init_interrupts(struct v4l2_subdev *sd)
Expand Down

0 comments on commit abeaca0

Please sign in to comment.