summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c
diff options
context:
space:
mode:
authorPhilipp Zabel <p.zabel@pengutronix.de>2015-08-20 09:35:43 +0200
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-09-03 18:48:06 +0200
commitabeaca0ff5666a1cd7460304e619e4c6a486ea04 (patch)
tree74f8dfe4d4114b4d08860a47ca1604c5e1dc8ae3 /drivers/media/i2c
parent[media] tc358743: add missing Kconfig dependency/select (diff)
downloadlinux-abeaca0ff5666a1cd7460304e619e4c6a486ea04.tar.xz
linux-abeaca0ff5666a1cd7460304e619e4c6a486ea04.zip
[media] tc358743: only queue subdev notifications if devnode is set
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>
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r--drivers/media/i2c/tc358743.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/i2c/tc358743.c b/drivers/media/i2c/tc358743.c
index 7a6fdecc7215..526d30745a19 100644
--- a/drivers/media/i2c/tc358743.c
+++ b/drivers/media/i2c/tc358743.c
@@ -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)