]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/media/radio/dsbr100.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
[mv-sheeva.git] / drivers / media / radio / dsbr100.c
index 5e0d651ffdd2dcd8ae57e61fab8c84c706c30b37..2014ebc4e984f12cb33f1c1a83f5c9e39b56abda 100644 (file)
@@ -154,8 +154,8 @@ devices, that would be 76 and 91.  */
 static int usb_dsbr100_probe(struct usb_interface *intf,
                             const struct usb_device_id *id);
 static void usb_dsbr100_disconnect(struct usb_interface *intf);
-static int usb_dsbr100_open(struct inode *inode, struct file *file);
-static int usb_dsbr100_close(struct inode *inode, struct file *file);
+static int usb_dsbr100_open(struct file *file);
+static int usb_dsbr100_close(struct file *file);
 static int usb_dsbr100_suspend(struct usb_interface *intf,
                                                pm_message_t message);
 static int usb_dsbr100_resume(struct usb_interface *intf);
@@ -236,7 +236,7 @@ usb_control_msg_failed:
        dev_err(&radio->usbdev->dev,
                "%s - usb_control_msg returned %i, request %i\n",
                        __func__, retval, request);
-       return -1;
+       return retval;
 
 }
 
@@ -279,7 +279,7 @@ usb_control_msg_failed:
        dev_err(&radio->usbdev->dev,
                "%s - usb_control_msg returned %i, request %i\n",
                        __func__, retval, request);
-       return -1;
+       return retval;
 
 }
 
@@ -336,7 +336,7 @@ usb_control_msg_failed:
        dev_err(&radio->usbdev->dev,
                "%s - usb_control_msg returned %i, request %i\n",
                        __func__, retval, request);
-       return -1;
+       return retval;
 }
 
 /* return the device status.  This is, in effect, just whether it
@@ -452,7 +452,7 @@ static int vidioc_s_frequency(struct file *file, void *priv,
 
        radio->curfreq = f->frequency;
        retval = dsbr100_setfreq(radio, radio->curfreq);
-       if (retval == -1)
+       if (retval < 0)
                dev_warn(&radio->usbdev->dev, "Set frequency failed\n");
        return 0;
 }
@@ -516,14 +516,14 @@ static int vidioc_s_ctrl(struct file *file, void *priv,
        case V4L2_CID_AUDIO_MUTE:
                if (ctrl->value) {
                        retval = dsbr100_stop(radio);
-                       if (retval == -1) {
+                       if (retval < 0) {
                                dev_warn(&radio->usbdev->dev,
                                         "Radio did not respond properly\n");
                                return -EBUSY;
                        }
                } else {
                        retval = dsbr100_start(radio);
-                       if (retval == -1) {
+                       if (retval < 0) {
                                dev_warn(&radio->usbdev->dev,
                                         "Radio did not respond properly\n");
                                return -EBUSY;
@@ -566,7 +566,7 @@ static int vidioc_s_audio(struct file *file, void *priv,
        return 0;
 }
 
-static int usb_dsbr100_open(struct inode *inode, struct file *file)
+static int usb_dsbr100_open(struct file *file)
 {
        struct dsbr100_device *radio = video_drvdata(file);
        int retval;
@@ -585,7 +585,7 @@ static int usb_dsbr100_open(struct inode *inode, struct file *file)
        }
 
        retval = dsbr100_setfreq(radio, radio->curfreq);
-       if (retval == -1)
+       if (retval < 0)
                dev_warn(&radio->usbdev->dev,
                        "set frequency failed\n");
 
@@ -593,7 +593,7 @@ static int usb_dsbr100_open(struct inode *inode, struct file *file)
        return 0;
 }
 
-static int usb_dsbr100_close(struct inode *inode, struct file *file)
+static int usb_dsbr100_close(struct file *file)
 {
        struct dsbr100_device *radio = video_drvdata(file);
        int retval;
@@ -604,7 +604,7 @@ static int usb_dsbr100_close(struct inode *inode, struct file *file)
        radio->users = 0;
        if (!radio->removed) {
                retval = dsbr100_stop(radio);
-               if (retval == -1) {
+               if (retval < 0) {
                        dev_warn(&radio->usbdev->dev,
                                "dsbr100_stop failed\n");
                }
@@ -620,7 +620,7 @@ static int usb_dsbr100_suspend(struct usb_interface *intf, pm_message_t message)
        int retval;
 
        retval = dsbr100_stop(radio);
-       if (retval == -1)
+       if (retval < 0)
                dev_warn(&intf->dev, "dsbr100_stop failed\n");
 
        dev_info(&intf->dev, "going into suspend..\n");
@@ -635,7 +635,7 @@ static int usb_dsbr100_resume(struct usb_interface *intf)
        int retval;
 
        retval = dsbr100_start(radio);
-       if (retval == -1)
+       if (retval < 0)
                dev_warn(&intf->dev, "dsbr100_start failed\n");
 
        dev_info(&intf->dev, "coming out of suspend..\n");
@@ -653,15 +653,11 @@ static void usb_dsbr100_video_device_release(struct video_device *videodev)
 }
 
 /* File system interface */
-static const struct file_operations usb_dsbr100_fops = {
+static const struct v4l2_file_operations usb_dsbr100_fops = {
        .owner          = THIS_MODULE,
        .open           = usb_dsbr100_open,
        .release        = usb_dsbr100_close,
        .ioctl          = video_ioctl2,
-#ifdef CONFIG_COMPAT
-       .compat_ioctl   = v4l_compat_ioctl32,
-#endif
-       .llseek         = no_llseek,
 };
 
 static const struct v4l2_ioctl_ops usb_dsbr100_ioctl_ops = {