struct bttv_fh *fh = f;
struct bttv *btv = fh->btv;
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
-
if (!v4l2_chip_match_host(®->match)) {
/* TODO: subdev errors should not be ignored, this should become a
subdev helper function. */
struct bttv_fh *fh = f;
struct bttv *btv = fh->btv;
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
-
if (!v4l2_chip_match_host(®->match)) {
/* TODO: subdev errors should not be ignored, this should become a
subdev helper function. */
return -EINVAL;
if ((reg->reg & 0x3) != 0)
return -EINVAL;
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
reg->size = 4;
reg->val = cx18_av_read4(cx, reg->reg & 0x00000ffc);
return 0;
return -EINVAL;
if ((reg->reg & 0x3) != 0)
return -EINVAL;
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
cx18_av_write4(cx, reg->reg & 0x00000ffc, reg->val);
return 0;
}
{
struct cx23885_dev *dev = ((struct cx23885_fh *)fh)->dev;
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
-
if (reg->match.type == V4L2_CHIP_MATCH_HOST) {
switch (reg->match.addr) {
case 0:
{
struct cx23885_dev *dev = ((struct cx23885_fh *)fh)->dev;
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
-
if (reg->match.type == V4L2_CHIP_MATCH_HOST) {
switch (reg->match.addr) {
case 0:
return -EINVAL;
if (addr < CX23888_IR_CNTRL_REG || addr > CX23888_IR_LEARN_REG)
return -EINVAL;
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
reg->size = 4;
reg->val = cx23888_ir_read4(state->dev, addr);
return 0;
return -EINVAL;
if (addr < CX23888_IR_CNTRL_REG || addr > CX23888_IR_LEARN_REG)
return -EINVAL;
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
cx23888_ir_write4(state->dev, addr, reg->val);
return 0;
}
{
volatile u8 __iomem *reg_start;
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
if (reg >= IVTV_REG_OFFSET && reg < IVTV_REG_OFFSET + IVTV_REG_SIZE)
reg_start = itv->reg_mem - IVTV_REG_OFFSET;
else if (itv->has_cx23415 && reg >= IVTV_DECODER_OFFSET &&
{
struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev;
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
if (v4l2_chip_match_host(®->match)) {
reg->val = saa7146_read(dev, reg->reg);
reg->size = 4;
{
struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev;
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
if (v4l2_chip_match_host(®->match)) {
saa7146_write(dev, reg->reg, reg->val);
return 0;
struct saa7164_dev *dev = port->dev;
dprintk(DBGLVL_ENC, "%s()\n", __func__);
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
-
return 0;
}
struct saa7164_dev *dev = port->dev;
dprintk(DBGLVL_ENC, "%s()\n", __func__);
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
-
return 0;
}
#endif