summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c/tvp7002.c
diff options
context:
space:
mode:
authorLad, Prabhakar2013-05-14 06:45:14 +0200
committerMauro Carvalho Chehab2013-05-27 14:34:06 +0200
commit7e89bd9f242930371f89f3d8c32eaf42ea1c74b1 (patch)
tree79c5b37e75aa14ca5e30e54eb26703f3640358ce /drivers/media/i2c/tvp7002.c
parent[media] coda: do not use v4l2_dev in coda_timeout (diff)
downloadkernel-qcow2-linux-7e89bd9f242930371f89f3d8c32eaf42ea1c74b1.tar.gz
kernel-qcow2-linux-7e89bd9f242930371f89f3d8c32eaf42ea1c74b1.tar.xz
kernel-qcow2-linux-7e89bd9f242930371f89f3d8c32eaf42ea1c74b1.zip
[media] media: i2c: remove duplicate checks for EPERM in dbg_g/s_register
This patch removes check for EPERM in dbg_g/s_register of subdevice drivers as this check is already performed by core. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/i2c/tvp7002.c')
-rw-r--r--drivers/media/i2c/tvp7002.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/media/i2c/tvp7002.c b/drivers/media/i2c/tvp7002.c
index 81b4eb40d7a6..f339e6faca90 100644
--- a/drivers/media/i2c/tvp7002.c
+++ b/drivers/media/i2c/tvp7002.c
@@ -736,8 +736,7 @@ static int tvp7002_query_dv_timings(struct v4l2_subdev *sd,
*
* Get the value of a TVP7002 decoder device register.
* Returns zero when successful, -EINVAL if register read fails or
- * access to I2C client fails, -EPERM if the call is not allowed
- * by disabled CAP_SYS_ADMIN.
+ * access to I2C client fails.
*/
static int tvp7002_g_register(struct v4l2_subdev *sd,
struct v4l2_dbg_register *reg)
@@ -748,8 +747,6 @@ static int tvp7002_g_register(struct v4l2_subdev *sd,
if (!v4l2_chip_match_i2c_client(client, &reg->match))
return -EINVAL;
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
ret = tvp7002_read(sd, reg->reg & 0xff, &val);
reg->val = val;
@@ -762,8 +759,7 @@ static int tvp7002_g_register(struct v4l2_subdev *sd,
* @reg: ptr to v4l2_dbg_register struct
*
* Get the value of a TVP7002 decoder device register.
- * Returns zero when successful, -EINVAL if register read fails or
- * -EPERM if call not allowed.
+ * Returns zero when successful, -EINVAL if register read fails.
*/
static int tvp7002_s_register(struct v4l2_subdev *sd,
const struct v4l2_dbg_register *reg)
@@ -772,8 +768,6 @@ static int tvp7002_s_register(struct v4l2_subdev *sd,
if (!v4l2_chip_match_i2c_client(client, &reg->match))
return -EINVAL;
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
return tvp7002_write(sd, reg->reg & 0xff, reg->val & 0xff);
}