summaryrefslogtreecommitdiff
path: root/linux/drivers/media/radio/radio-si470x.c
diff options
context:
space:
mode:
authorTobias Lorenz <tobias.lorenz@gmx.net>2008-09-25 00:33:09 +0200
committerTobias Lorenz <tobias.lorenz@gmx.net>2008-09-25 00:33:09 +0200
commit249fbadb72a07d531183d4a034f608be9999efa3 (patch)
tree3c5575e3f8ec856a50ecf1079aaf05aa642c2e61 /linux/drivers/media/radio/radio-si470x.c
parent2217490ce646247b0c1c3aa30fedc9b3e26c7c26 (diff)
downloadmediapointer-dvb-s2-249fbadb72a07d531183d4a034f608be9999efa3.tar.gz
mediapointer-dvb-s2-249fbadb72a07d531183d4a034f608be9999efa3.tar.bz2
si470x: removement of get/set input/audio
From: Tobias Lorenz <tobias.lorenz@gmx.net> Hi Mauro, this patch removes the unnecessary get/set input/audio functions. The reason is, that the V4L2 specification says, that if input or audio cannot be switched anyway, the functions doesn't need to be implemented. I've tested the new driver with all current radio programs in Debian/testing and found no problems with that. In my opinion, the driver is much cleaner by removing these unnecessary functions. Bye, Toby Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net>
Diffstat (limited to 'linux/drivers/media/radio/radio-si470x.c')
-rw-r--r--linux/drivers/media/radio/radio-si470x.c72
1 files changed, 4 insertions, 68 deletions
diff --git a/linux/drivers/media/radio/radio-si470x.c b/linux/drivers/media/radio/radio-si470x.c
index 7572d434b..e332b3de5 100644
--- a/linux/drivers/media/radio/radio-si470x.c
+++ b/linux/drivers/media/radio/radio-si470x.c
@@ -1221,36 +1221,6 @@ static int si470x_vidioc_querycap(struct file *file, void *priv,
/*
- * si470x_vidioc_g_input - get input
- */
-static int si470x_vidioc_g_input(struct file *file, void *priv,
- unsigned int *i)
-{
- *i = 0;
-
- return 0;
-}
-
-
-/*
- * si470x_vidioc_s_input - set input
- */
-static int si470x_vidioc_s_input(struct file *file, void *priv, unsigned int i)
-{
- int retval = 0;
-
- /* safety checks */
- if (i != 0)
- retval = -EINVAL;
-
- if (retval < 0)
- printk(KERN_WARNING DRIVER_NAME
- ": set input failed with %d\n", retval);
- return retval;
-}
-
-
-/*
* si470x_vidioc_queryctrl - enumerate control items
*/
static int si470x_vidioc_queryctrl(struct file *file, void *priv,
@@ -1369,44 +1339,13 @@ done:
static int si470x_vidioc_g_audio(struct file *file, void *priv,
struct v4l2_audio *audio)
{
- int retval = 0;
-
- /* safety checks */
- if (audio->index != 0) {
- retval = -EINVAL;
- goto done;
- }
-
+ /* driver constants */
+ audio->index = 0;
strcpy(audio->name, "Radio");
audio->capability = V4L2_AUDCAP_STEREO;
+ audio->mode = 0;
-done:
- if (retval < 0)
- printk(KERN_WARNING DRIVER_NAME
- ": get audio failed with %d\n", retval);
- return retval;
-}
-
-
-/*
- * si470x_vidioc_s_audio - set audio attributes
- */
-static int si470x_vidioc_s_audio(struct file *file, void *priv,
- struct v4l2_audio *audio)
-{
- int retval = 0;
-
- /* safety checks */
- if (audio->index != 0) {
- retval = -EINVAL;
- goto done;
- }
-
-done:
- if (retval < 0)
- printk(KERN_WARNING DRIVER_NAME
- ": set audio failed with %d\n", retval);
- return retval;
+ return 0;
}
@@ -1618,13 +1557,10 @@ done:
*/
static const struct v4l2_ioctl_ops si470x_ioctl_ops = {
.vidioc_querycap = si470x_vidioc_querycap,
- .vidioc_g_input = si470x_vidioc_g_input,
- .vidioc_s_input = si470x_vidioc_s_input,
.vidioc_queryctrl = si470x_vidioc_queryctrl,
.vidioc_g_ctrl = si470x_vidioc_g_ctrl,
.vidioc_s_ctrl = si470x_vidioc_s_ctrl,
.vidioc_g_audio = si470x_vidioc_g_audio,
- .vidioc_s_audio = si470x_vidioc_s_audio,
.vidioc_g_tuner = si470x_vidioc_g_tuner,
.vidioc_s_tuner = si470x_vidioc_s_tuner,
.vidioc_g_frequency = si470x_vidioc_g_frequency,