From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: linux-media@vger.kernel.org
Cc: laurent.pinchart@ideasonboard.com
Subject: [yavta PATCH 1/1] Zero dev in main()
Date: Thu, 22 Nov 2018 17:29:56 +0200 [thread overview]
Message-ID: <20181122152956.23649-1-sakari.ailus@linux.intel.com> (raw)
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
next reply other threads:[~2018-11-23 2:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-22 15:29 Sakari Ailus [this message]
2018-11-29 23:40 ` [yavta PATCH 1/1] Zero dev in main() Laurent Pinchart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181122152956.23649-1-sakari.ailus@linux.intel.com \
--to=sakari.ailus@linux.intel.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox