diff options
Diffstat (limited to 'drivers/media/video')
-rw-r--r-- | drivers/media/video/cx88/cx88-mpeg.c | 2 | ||||
-rw-r--r-- | drivers/media/video/ivtv/ivtv-fileops.c | 6 | ||||
-rw-r--r-- | drivers/media/video/ivtv/ivtv-ioctl.c | 17 | ||||
-rw-r--r-- | drivers/media/video/pwc/pwc-if.c | 2 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-cards.c | 12 | ||||
-rw-r--r-- | drivers/media/video/saa7191.c | 4 | ||||
-rw-r--r-- | drivers/media/video/usbvision/usbvision-cards.c | 1 |
7 files changed, 27 insertions, 17 deletions
diff --git a/drivers/media/video/cx88/cx88-mpeg.c b/drivers/media/video/cx88/cx88-mpeg.c index 317a2a3f9cc1..da7a6b591a67 100644 --- a/drivers/media/video/cx88/cx88-mpeg.c +++ b/drivers/media/video/cx88/cx88-mpeg.c | |||
@@ -580,7 +580,7 @@ struct cx8802_dev * cx8802_get_device(struct inode *inode) | |||
580 | 580 | ||
581 | list_for_each(list,&cx8802_devlist) { | 581 | list_for_each(list,&cx8802_devlist) { |
582 | h = list_entry(list, struct cx8802_dev, devlist); | 582 | h = list_entry(list, struct cx8802_dev, devlist); |
583 | if (h->mpeg_dev->minor == minor) | 583 | if (h->mpeg_dev && h->mpeg_dev->minor == minor) |
584 | return h; | 584 | return h; |
585 | } | 585 | } |
586 | 586 | ||
diff --git a/drivers/media/video/ivtv/ivtv-fileops.c b/drivers/media/video/ivtv/ivtv-fileops.c index 5dd519caf81d..0285c4a830eb 100644 --- a/drivers/media/video/ivtv/ivtv-fileops.c +++ b/drivers/media/video/ivtv/ivtv-fileops.c | |||
@@ -190,7 +190,9 @@ static void ivtv_update_pgm_info(struct ivtv *itv) | |||
190 | int idx = (itv->pgm_info_write_idx + i) % itv->pgm_info_num; | 190 | int idx = (itv->pgm_info_write_idx + i) % itv->pgm_info_num; |
191 | struct v4l2_enc_idx_entry *e = itv->pgm_info + idx; | 191 | struct v4l2_enc_idx_entry *e = itv->pgm_info + idx; |
192 | u32 addr = itv->pgm_info_offset + 4 + idx * 24; | 192 | u32 addr = itv->pgm_info_offset + 4 + idx * 24; |
193 | const int mapping[] = { V4L2_ENC_IDX_FRAME_P, V4L2_ENC_IDX_FRAME_I, V4L2_ENC_IDX_FRAME_B, 0 }; | 193 | const int mapping[8] = { -1, V4L2_ENC_IDX_FRAME_I, V4L2_ENC_IDX_FRAME_P, -1, |
194 | V4L2_ENC_IDX_FRAME_B, -1, -1, -1 }; | ||
195 | // 1=I, 2=P, 4=B | ||
194 | 196 | ||
195 | e->offset = read_enc(addr + 4) + ((u64)read_enc(addr + 8) << 32); | 197 | e->offset = read_enc(addr + 4) + ((u64)read_enc(addr + 8) << 32); |
196 | if (e->offset > itv->mpg_data_received) { | 198 | if (e->offset > itv->mpg_data_received) { |
@@ -199,7 +201,7 @@ static void ivtv_update_pgm_info(struct ivtv *itv) | |||
199 | e->offset += itv->vbi_data_inserted; | 201 | e->offset += itv->vbi_data_inserted; |
200 | e->length = read_enc(addr); | 202 | e->length = read_enc(addr); |
201 | e->pts = read_enc(addr + 16) + ((u64)(read_enc(addr + 20) & 1) << 32); | 203 | e->pts = read_enc(addr + 16) + ((u64)(read_enc(addr + 20) & 1) << 32); |
202 | e->flags = mapping[read_enc(addr + 12) & 3]; | 204 | e->flags = mapping[read_enc(addr + 12) & 7]; |
203 | i++; | 205 | i++; |
204 | } | 206 | } |
205 | itv->pgm_info_write_idx = (itv->pgm_info_write_idx + i) % itv->pgm_info_num; | 207 | itv->pgm_info_write_idx = (itv->pgm_info_write_idx + i) % itv->pgm_info_num; |
diff --git a/drivers/media/video/ivtv/ivtv-ioctl.c b/drivers/media/video/ivtv/ivtv-ioctl.c index 5977a79619c2..dfe0aedc60fd 100644 --- a/drivers/media/video/ivtv/ivtv-ioctl.c +++ b/drivers/media/video/ivtv/ivtv-ioctl.c | |||
@@ -1099,14 +1099,21 @@ int ivtv_v4l2_ioctls(struct ivtv *itv, struct file *filp, unsigned int cmd, void | |||
1099 | 1099 | ||
1100 | case VIDIOC_G_ENC_INDEX: { | 1100 | case VIDIOC_G_ENC_INDEX: { |
1101 | struct v4l2_enc_idx *idx = arg; | 1101 | struct v4l2_enc_idx *idx = arg; |
1102 | struct v4l2_enc_idx_entry *e = idx->entry; | ||
1103 | int entries; | ||
1102 | int i; | 1104 | int i; |
1103 | 1105 | ||
1104 | idx->entries = (itv->pgm_info_write_idx + IVTV_MAX_PGM_INDEX - itv->pgm_info_read_idx) % | 1106 | entries = (itv->pgm_info_write_idx + IVTV_MAX_PGM_INDEX - itv->pgm_info_read_idx) % |
1105 | IVTV_MAX_PGM_INDEX; | 1107 | IVTV_MAX_PGM_INDEX; |
1106 | if (idx->entries > V4L2_ENC_IDX_ENTRIES) | 1108 | if (entries > V4L2_ENC_IDX_ENTRIES) |
1107 | idx->entries = V4L2_ENC_IDX_ENTRIES; | 1109 | entries = V4L2_ENC_IDX_ENTRIES; |
1108 | for (i = 0; i < idx->entries; i++) { | 1110 | idx->entries = 0; |
1109 | idx->entry[i] = itv->pgm_info[(itv->pgm_info_read_idx + i) % IVTV_MAX_PGM_INDEX]; | 1111 | for (i = 0; i < entries; i++) { |
1112 | *e = itv->pgm_info[(itv->pgm_info_read_idx + i) % IVTV_MAX_PGM_INDEX]; | ||
1113 | if ((e->flags & V4L2_ENC_IDX_FRAME_MASK) <= V4L2_ENC_IDX_FRAME_B) { | ||
1114 | idx->entries++; | ||
1115 | e++; | ||
1116 | } | ||
1110 | } | 1117 | } |
1111 | itv->pgm_info_read_idx = (itv->pgm_info_read_idx + idx->entries) % IVTV_MAX_PGM_INDEX; | 1118 | itv->pgm_info_read_idx = (itv->pgm_info_read_idx + idx->entries) % IVTV_MAX_PGM_INDEX; |
1112 | break; | 1119 | break; |
diff --git a/drivers/media/video/pwc/pwc-if.c b/drivers/media/video/pwc/pwc-if.c index 3d81966d8c42..931b274bffca 100644 --- a/drivers/media/video/pwc/pwc-if.c +++ b/drivers/media/video/pwc/pwc-if.c | |||
@@ -1243,7 +1243,7 @@ static int pwc_video_close(struct inode *inode, struct file *file) | |||
1243 | PWC_ERROR("Failed to power down camera (%d)\n", i); | 1243 | PWC_ERROR("Failed to power down camera (%d)\n", i); |
1244 | } | 1244 | } |
1245 | pdev->vopen--; | 1245 | pdev->vopen--; |
1246 | PWC_DEBUG_OPEN("<< video_close() vopen=%d\n", i); | 1246 | PWC_DEBUG_OPEN("<< video_close() vopen=%d\n", pdev->vopen); |
1247 | } else { | 1247 | } else { |
1248 | pwc_cleanup(pdev); | 1248 | pwc_cleanup(pdev); |
1249 | /* Free memory (don't set pdev to 0 just yet) */ | 1249 | /* Free memory (don't set pdev to 0 just yet) */ |
diff --git a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/video/saa7134/saa7134-cards.c index 8ec83bd70094..25ec16810818 100644 --- a/drivers/media/video/saa7134/saa7134-cards.c +++ b/drivers/media/video/saa7134/saa7134-cards.c | |||
@@ -1537,18 +1537,18 @@ struct saa7134_board saa7134_boards[] = { | |||
1537 | },{ | 1537 | },{ |
1538 | .name = name_comp1, | 1538 | .name = name_comp1, |
1539 | .vmux = 0, | 1539 | .vmux = 0, |
1540 | .amux = LINE2, | 1540 | .amux = LINE1, |
1541 | .gpio = 0x00, | 1541 | .gpio = 0x02, |
1542 | },{ | 1542 | },{ |
1543 | .name = name_comp2, | 1543 | .name = name_comp2, |
1544 | .vmux = 3, | 1544 | .vmux = 3, |
1545 | .amux = LINE2, | 1545 | .amux = LINE1, |
1546 | .gpio = 0x00, | 1546 | .gpio = 0x02, |
1547 | },{ | 1547 | },{ |
1548 | .name = name_svideo, | 1548 | .name = name_svideo, |
1549 | .vmux = 8, | 1549 | .vmux = 8, |
1550 | .amux = LINE2, | 1550 | .amux = LINE1, |
1551 | .gpio = 0x00, | 1551 | .gpio = 0x02, |
1552 | }}, | 1552 | }}, |
1553 | .radio = { | 1553 | .radio = { |
1554 | .name = name_radio, | 1554 | .name = name_radio, |
diff --git a/drivers/media/video/saa7191.c b/drivers/media/video/saa7191.c index 8615a6081a5d..b4018cce3285 100644 --- a/drivers/media/video/saa7191.c +++ b/drivers/media/video/saa7191.c | |||
@@ -130,7 +130,7 @@ static int saa7191_write_reg(struct i2c_client *client, u8 reg, | |||
130 | 130 | ||
131 | /* the first byte of data must be the first subaddress number (register) */ | 131 | /* the first byte of data must be the first subaddress number (register) */ |
132 | static int saa7191_write_block(struct i2c_client *client, | 132 | static int saa7191_write_block(struct i2c_client *client, |
133 | u8 length, u8 *data) | 133 | u8 length, const u8 *data) |
134 | { | 134 | { |
135 | int i; | 135 | int i; |
136 | int ret; | 136 | int ret; |
@@ -592,7 +592,7 @@ static int saa7191_attach(struct i2c_adapter *adap, int addr, int kind) | |||
592 | if (err) | 592 | if (err) |
593 | goto out_free_decoder; | 593 | goto out_free_decoder; |
594 | 594 | ||
595 | err = saa7191_write_block(client, sizeof(initseq), (u8 *)initseq); | 595 | err = saa7191_write_block(client, sizeof(initseq), initseq); |
596 | if (err) { | 596 | if (err) { |
597 | printk(KERN_ERR "SAA7191 initialization failed\n"); | 597 | printk(KERN_ERR "SAA7191 initialization failed\n"); |
598 | goto out_detach_client; | 598 | goto out_detach_client; |
diff --git a/drivers/media/video/usbvision/usbvision-cards.c b/drivers/media/video/usbvision/usbvision-cards.c index 380564cd3317..f09eb102731b 100644 --- a/drivers/media/video/usbvision/usbvision-cards.c +++ b/drivers/media/video/usbvision/usbvision-cards.c | |||
@@ -1081,6 +1081,7 @@ struct usb_device_id usbvision_table [] = { | |||
1081 | { USB_DEVICE(0x2304, 0x0301), .driver_info=PINNA_LINX_VD_IN_CAB_PAL }, | 1081 | { USB_DEVICE(0x2304, 0x0301), .driver_info=PINNA_LINX_VD_IN_CAB_PAL }, |
1082 | { USB_DEVICE(0x2304, 0x0419), .driver_info=PINNA_PCTV_BUNGEE_PAL_FM }, | 1082 | { USB_DEVICE(0x2304, 0x0419), .driver_info=PINNA_PCTV_BUNGEE_PAL_FM }, |
1083 | { USB_DEVICE(0x2400, 0x4200), .driver_info=HPG_WINTV }, | 1083 | { USB_DEVICE(0x2400, 0x4200), .driver_info=HPG_WINTV }, |
1084 | { }, /* terminate list */ | ||
1084 | }; | 1085 | }; |
1085 | 1086 | ||
1086 | MODULE_DEVICE_TABLE (usb, usbvision_table); | 1087 | MODULE_DEVICE_TABLE (usb, usbvision_table); |