From: Alexey Klimov <klimov.linux@gmail.com>
To: linux-media@vger.kernel.org
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>,
Hans Verkuil <hverkuil@xs4all.nl>,
Douglas Schilling Landgraf <dougsland@gmail.com>
Subject: [question] about open/release and vidioc_g_input/vidioc_s_input functions
Date: Tue, 24 Mar 2009 02:14:07 +0300 [thread overview]
Message-ID: <1237850047.31041.162.camel@tux.localhost> (raw)
Hello, all
After last convertion of radio drivers to use v4l2_device we have such
code in many radio drivers:
(it's radio-terratec.c for example)
...
static int terratec_open(struct file *file)
{
return 0;
}
static int terratec_release(struct file *file)
{
return 0;
}
...
and
...
static int vidioc_g_input(struct file *filp, void *priv, unsigned int
*i)
{
*i = 0;
return 0;
}
static int vidioc_s_input(struct file *filp, void *priv, unsigned int i)
{
return i ? -EINVAL : 0;
}
...
Such code used in many radio-drivers as i understand.
Is it good to place this empty and almost empty functions in:
(here i see two variants)
1) In header file that be in linux/drivers/media/radio/ directory.
Later, we can move some generic/or repeating code in this header.
2) In any v4l header. What header may contain this ?
?
For what ? Well, as i understand we can decrease amount of lines and
provide this simple generic functions. It's like
video_device_release_empty function behaviour. Maybe not only radio
drivers can use such vidioc_g_input and vidioc_s_input.
Is it worth ?
--
Best regards, Klimov Alexey
next reply other threads:[~2009-03-23 23:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-23 23:14 Alexey Klimov [this message]
2009-03-24 7:06 ` [question] about open/release and vidioc_g_input/vidioc_s_input functions Hans Verkuil
2009-03-24 9:58 ` Laurent Pinchart
2009-03-27 16:44 ` Alexey Klimov
2009-03-27 16:50 ` Hans Verkuil
2009-03-27 17:34 ` Alexey Klimov
2009-03-27 17:45 ` Hans Verkuil
-- strict thread matches above, loose matches on Subject: below --
2009-03-24 10:24 Hans Verkuil
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=1237850047.31041.162.camel@tux.localhost \
--to=klimov.linux@gmail.com \
--cc=dougsland@gmail.com \
--cc=hverkuil@xs4all.nl \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@infradead.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 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.