public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [yavta PATCH 1/1] Zero dev in main()
@ 2018-11-22 15:29 Sakari Ailus
  2018-11-29 23:40 ` Laurent Pinchart
  0 siblings, 1 reply; 2+ messages in thread
From: Sakari Ailus @ 2018-11-22 15:29 UTC (permalink / raw)
  To: linux-media; +Cc: laurent.pinchart

From: Sakari Ailus <sakari.ailus@iki.fi>

This is necessary since video_open() may not be always called soon

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
---
 yavta.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/yavta.c b/yavta.c
index c7986bd..de5376d 100644
--- a/yavta.c
+++ b/yavta.c
@@ -342,7 +342,6 @@ static bool video_has_valid_buf_type(struct device *dev)
 
 static void video_init(struct device *dev)
 {
-	memset(dev, 0, sizeof *dev);
 	dev->fd = -1;
 	dev->memtype = V4L2_MEMORY_MMAP;
 	dev->buffers = NULL;
@@ -1903,7 +1902,7 @@ static struct option opts[] = {
 int main(int argc, char *argv[])
 {
 	struct sched_param sched;
-	struct device dev;
+	struct device dev = { 0 };
 	int ret;
 
 	/* Options parsings */
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-11-30 10:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-22 15:29 [yavta PATCH 1/1] Zero dev in main() Sakari Ailus
2018-11-29 23:40 ` Laurent Pinchart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox