[media] tc358743: only queue subdev notifications if devnode is set
authorPhilipp Zabel <p.zabel@pengutronix.de>
Thu, 20 Aug 2015 07:35:43 +0000 (04:35 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Thu, 3 Sep 2015 16:48:06 +0000 (13:48 -0300)
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>
drivers/media/i2c/tc358743.c

index 7a6fdecc7215beeda1ab3a9b17d56a09450888c1..526d30745a19fbcd4932ded24328915dcd24afd9 100644 (file)
@@ -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)
This page took 0.026888 seconds and 5 git commands to generate.