[media] V4L2: drivers implementing vidioc_default should also return -ENOTTY
authorHans Verkuil <hans.verkuil@cisco.com>
Thu, 19 Apr 2012 15:36:03 +0000 (12:36 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 19 Apr 2012 20:23:55 +0000 (17:23 -0300)
If the vidioc_default implementation doesn't support the ioctl, then drivers
must return -ENOTTY instead of -EINVAL.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/cx18/cx18-ioctl.c
drivers/media/video/davinci/vpfe_capture.c
drivers/media/video/ivtv/ivtv-ioctl.c
drivers/media/video/meye.c
drivers/media/video/mxb.c

index be49f68ddf370d2d71a7df48dfc53b91931e301f..35fde4e931f5c4c4b7c97e7303d229acf3b35500 100644 (file)
@@ -1137,7 +1137,7 @@ static long cx18_default(struct file *file, void *fh, bool valid_prio,
        }
 
        default:
-               return -EINVAL;
+               return -ENOTTY;
        }
        return 0;
 }
index 20cf271a774b81b6c3d9b32b963287f30130f3f7..49a845fb804a006fb0951a4426d543f31ac986d0 100644 (file)
@@ -1761,7 +1761,7 @@ static long vpfe_param_handler(struct file *file, void *priv,
                }
                break;
        default:
-               ret = -EINVAL;
+               ret = -ENOTTY;
        }
 unlock_out:
        mutex_unlock(&vpfe_dev->lock);
index 989e556913edd063f35013c3004677196bfa19f5..a151271f60e18e88bbdf0475da78dc48806a576a 100644 (file)
@@ -1827,7 +1827,7 @@ static long ivtv_default(struct file *file, void *fh, bool valid_prio,
                return ivtv_decoder_ioctls(file, cmd, (void *)arg);
 
        default:
-               return -EINVAL;
+               return -ENOTTY;
        }
        return 0;
 }
index b09a3c80a15e3ce41e3e73cb55faf7f6b22c7f82..7bc775219f9722fb6e6dd2e27905cf6113cf7dfd 100644 (file)
@@ -1570,7 +1570,7 @@ static long vidioc_default(struct file *file, void *fh, bool valid_prio,
                return meyeioc_stilljcapt((int *) arg);
 
        default:
-               return -EINVAL;
+               return -ENOTTY;
        }
 
 }
index 2e4131748438d158ff7127a1469629221700ff67..ca3f70f0bad58ee4db6ae216890b4b3eb3d162f8 100644 (file)
@@ -688,7 +688,7 @@ static long vidioc_default(struct file *file, void *fh, bool valid_prio,
 /*
                DEB2(pr_err("does not handle this ioctl\n"));
 */
-               return -ENOIOCTLCMD;
+               return -ENOTTY;
        }
        return 0;
 }