diff options
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-ioctl.c')
-rw-r--r-- | drivers/media/video/ivtv/ivtv-ioctl.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/media/video/ivtv/ivtv-ioctl.c b/drivers/media/video/ivtv/ivtv-ioctl.c index 1f6ca93b9840..f6b3ef6e691b 100644 --- a/drivers/media/video/ivtv/ivtv-ioctl.c +++ b/drivers/media/video/ivtv/ivtv-ioctl.c | |||
@@ -674,19 +674,19 @@ static int ivtv_s_fmt_vid_out_overlay(struct file *file, void *fh, struct v4l2_f | |||
674 | return ret; | 674 | return ret; |
675 | } | 675 | } |
676 | 676 | ||
677 | static int ivtv_g_chip_ident(struct file *file, void *fh, struct v4l2_chip_ident *chip) | 677 | static int ivtv_g_chip_ident(struct file *file, void *fh, struct v4l2_dbg_chip_ident *chip) |
678 | { | 678 | { |
679 | struct ivtv *itv = ((struct ivtv_open_id *)fh)->itv; | 679 | struct ivtv *itv = ((struct ivtv_open_id *)fh)->itv; |
680 | 680 | ||
681 | chip->ident = V4L2_IDENT_NONE; | 681 | chip->ident = V4L2_IDENT_NONE; |
682 | chip->revision = 0; | 682 | chip->revision = 0; |
683 | if (chip->match_type == V4L2_CHIP_MATCH_HOST) { | 683 | if (chip->match.type == V4L2_CHIP_MATCH_HOST) { |
684 | if (v4l2_chip_match_host(chip->match_type, chip->match_chip)) | 684 | if (v4l2_chip_match_host(&chip->match)) |
685 | chip->ident = itv->has_cx23415 ? V4L2_IDENT_CX23415 : V4L2_IDENT_CX23416; | 685 | chip->ident = itv->has_cx23415 ? V4L2_IDENT_CX23415 : V4L2_IDENT_CX23416; |
686 | return 0; | 686 | return 0; |
687 | } | 687 | } |
688 | if (chip->match_type != V4L2_CHIP_MATCH_I2C_DRIVER && | 688 | if (chip->match.type != V4L2_CHIP_MATCH_I2C_DRIVER && |
689 | chip->match_type != V4L2_CHIP_MATCH_I2C_ADDR) | 689 | chip->match.type != V4L2_CHIP_MATCH_I2C_ADDR) |
690 | return -EINVAL; | 690 | return -EINVAL; |
691 | /* TODO: is this correct? */ | 691 | /* TODO: is this correct? */ |
692 | return ivtv_call_all_err(itv, core, g_chip_ident, chip); | 692 | return ivtv_call_all_err(itv, core, g_chip_ident, chip); |
@@ -695,7 +695,7 @@ static int ivtv_g_chip_ident(struct file *file, void *fh, struct v4l2_chip_ident | |||
695 | #ifdef CONFIG_VIDEO_ADV_DEBUG | 695 | #ifdef CONFIG_VIDEO_ADV_DEBUG |
696 | static int ivtv_itvc(struct ivtv *itv, unsigned int cmd, void *arg) | 696 | static int ivtv_itvc(struct ivtv *itv, unsigned int cmd, void *arg) |
697 | { | 697 | { |
698 | struct v4l2_register *regs = arg; | 698 | struct v4l2_dbg_register *regs = arg; |
699 | volatile u8 __iomem *reg_start; | 699 | volatile u8 __iomem *reg_start; |
700 | 700 | ||
701 | if (!capable(CAP_SYS_ADMIN)) | 701 | if (!capable(CAP_SYS_ADMIN)) |
@@ -710,6 +710,7 @@ static int ivtv_itvc(struct ivtv *itv, unsigned int cmd, void *arg) | |||
710 | else | 710 | else |
711 | return -EINVAL; | 711 | return -EINVAL; |
712 | 712 | ||
713 | regs->size = 4; | ||
713 | if (cmd == VIDIOC_DBG_G_REGISTER) | 714 | if (cmd == VIDIOC_DBG_G_REGISTER) |
714 | regs->val = readl(regs->reg + reg_start); | 715 | regs->val = readl(regs->reg + reg_start); |
715 | else | 716 | else |
@@ -717,11 +718,11 @@ static int ivtv_itvc(struct ivtv *itv, unsigned int cmd, void *arg) | |||
717 | return 0; | 718 | return 0; |
718 | } | 719 | } |
719 | 720 | ||
720 | static int ivtv_g_register(struct file *file, void *fh, struct v4l2_register *reg) | 721 | static int ivtv_g_register(struct file *file, void *fh, struct v4l2_dbg_register *reg) |
721 | { | 722 | { |
722 | struct ivtv *itv = ((struct ivtv_open_id *)fh)->itv; | 723 | struct ivtv *itv = ((struct ivtv_open_id *)fh)->itv; |
723 | 724 | ||
724 | if (v4l2_chip_match_host(reg->match_type, reg->match_chip)) | 725 | if (v4l2_chip_match_host(®->match)) |
725 | return ivtv_itvc(itv, VIDIOC_DBG_G_REGISTER, reg); | 726 | return ivtv_itvc(itv, VIDIOC_DBG_G_REGISTER, reg); |
726 | /* TODO: subdev errors should not be ignored, this should become a | 727 | /* TODO: subdev errors should not be ignored, this should become a |
727 | subdev helper function. */ | 728 | subdev helper function. */ |
@@ -729,11 +730,11 @@ static int ivtv_g_register(struct file *file, void *fh, struct v4l2_register *re | |||
729 | return 0; | 730 | return 0; |
730 | } | 731 | } |
731 | 732 | ||
732 | static int ivtv_s_register(struct file *file, void *fh, struct v4l2_register *reg) | 733 | static int ivtv_s_register(struct file *file, void *fh, struct v4l2_dbg_register *reg) |
733 | { | 734 | { |
734 | struct ivtv *itv = ((struct ivtv_open_id *)fh)->itv; | 735 | struct ivtv *itv = ((struct ivtv_open_id *)fh)->itv; |
735 | 736 | ||
736 | if (v4l2_chip_match_host(reg->match_type, reg->match_chip)) | 737 | if (v4l2_chip_match_host(®->match)) |
737 | return ivtv_itvc(itv, VIDIOC_DBG_S_REGISTER, reg); | 738 | return ivtv_itvc(itv, VIDIOC_DBG_S_REGISTER, reg); |
738 | /* TODO: subdev errors should not be ignored, this should become a | 739 | /* TODO: subdev errors should not be ignored, this should become a |
739 | subdev helper function. */ | 740 | subdev helper function. */ |