All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [media] tc358743: only queue subdev notifications if devnode is set
@ 2015-08-20  7:35 Philipp Zabel
  0 siblings, 0 replies; only message in thread
From: Philipp Zabel @ 2015-08-20  7:35 UTC (permalink / raw)
  To: Hans Verkuil; +Cc: Mats Randgaard, linux-media, kernel, Philipp Zabel

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>
---
 drivers/media/i2c/tc358743.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/media/i2c/tc358743.c b/drivers/media/i2c/tc358743.c
index 7eba223..cd73cb4 100644
--- a/drivers/media/i2c/tc358743.c
+++ b/drivers/media/i2c/tc358743.c
@@ -860,7 +860,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)
-- 
2.4.6


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-08-20  7:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-20  7:35 [PATCH] [media] tc358743: only queue subdev notifications if devnode is set Philipp Zabel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.