Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 61357
b: refs/heads/master
c: 55c0d10
h: refs/heads/master
i:
  61355: c5e8747
v: v3
  • Loading branch information
Trent Piepho authored and Mauro Carvalho Chehab committed Jul 18, 2007
1 parent b04ee71 commit 935ea5d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8c2c0dfe4da28a152c0de2c2ca3a66c1bc2fef7c
refs/heads/master: 55c0d1005a0e5f590f71f918e49bdc81362f93a6
22 changes: 22 additions & 0 deletions trunk/drivers/media/video/bt8xx/bttv-driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -2259,6 +2259,24 @@ static int bttv_common_ioctls(struct bttv *btv, unsigned int cmd, void *arg)
printk(KERN_INFO "bttv%d: ================== END STATUS CARD #%d ==================\n", btv->c.nr, btv->c.nr);
return 0;
}
#ifdef CONFIG_VIDEO_ADV_DEBUG
case VIDIOC_DBG_G_REGISTER:
case VIDIOC_DBG_S_REGISTER:
{
struct v4l2_register *reg = arg;
if (!capable(CAP_SYS_ADMIN))
return -EPERM;
if (!v4l2_chip_match_host(reg->match_type, reg->match_chip))
return -EINVAL;
/* bt848 has a 12-bit register space */
reg->reg &= 0xfff;
if (cmd == VIDIOC_DBG_G_REGISTER)
reg->val = btread(reg->reg);
else
btwrite(reg->val, reg->reg);
return 0;
}
#endif

default:
return -ENOIOCTLCMD;
Expand Down Expand Up @@ -3569,6 +3587,8 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file,
case VIDIOC_G_FREQUENCY:
case VIDIOC_S_FREQUENCY:
case VIDIOC_LOG_STATUS:
case VIDIOC_DBG_G_REGISTER:
case VIDIOC_DBG_S_REGISTER:
return bttv_common_ioctls(btv,cmd,arg);

default:
Expand Down Expand Up @@ -3951,6 +3971,8 @@ static int radio_do_ioctl(struct inode *inode, struct file *file,
case VIDIOCGAUDIO:
case VIDIOCSAUDIO:
case VIDIOC_LOG_STATUS:
case VIDIOC_DBG_G_REGISTER:
case VIDIOC_DBG_S_REGISTER:
return bttv_common_ioctls(btv,cmd,arg);

default:
Expand Down

0 comments on commit 935ea5d

Please sign in to comment.