diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-09-14 16:59:05 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-09-14 16:59:05 -0400 |
commit | 44e3ff32ac229a10a30b7b840f092f5b32a5f72a (patch) | |
tree | a219aced0374eda136b937b2c3f807464a346d92 | |
parent | 7a1fa065a0264f6b3d3003ba5635289f6583c478 (diff) | |
parent | e90ff9239e7636a191a8998a70cea220a2c58cdf (diff) |
Merge branch 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb
* 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb:
V4L/DVB (6220a): fix build error for et61x251 driver
V4L/DVB (6188): Avoid a NULL pointer dereference during mpeg_open()
V4L/DVB (6173a): Documentation: Remove reference to dead "cpia_pp=" boot-time option
V4L/DVB (6148): Fix a warning at saa7191_probe
V4L/DVB (6147): Pwc: Fix a broken debug message
V4L/DVB (6144): Fix mux setup for composite sound on AverTV 307
V4L/DVB (6095): ivtv: fix VIDIOC_G_ENC_INDEX flag handling
-rw-r--r-- | Documentation/kernel-parameters.txt | 23 | ||||
-rw-r--r-- | Documentation/video4linux/cx2341x/fw-encoder-api.txt | 4 | ||||
-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-- | include/media/v4l2-dev.h | 5 |
9 files changed, 42 insertions, 33 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index b41cde31d112..586b6f85d4e0 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -1,5 +1,5 @@ | |||
1 | Kernel Parameters | 1 | Kernel Parameters |
2 | ~~~~~~~~~~~~~~~~~ | 2 | ~~~~~~~~~~~~~~~~~ |
3 | 3 | ||
4 | The following is a consolidated list of the kernel parameters as implemented | 4 | The following is a consolidated list of the kernel parameters as implemented |
5 | (mostly) by the __setup() macro and sorted into English Dictionary order | 5 | (mostly) by the __setup() macro and sorted into English Dictionary order |
@@ -468,9 +468,6 @@ and is between 256 and 4096 characters. It is defined in the file | |||
468 | Format: | 468 | Format: |
469 | <first_slot>,<last_slot>,<port>,<enum_bit>[,<debug>] | 469 | <first_slot>,<last_slot>,<port>,<enum_bit>[,<debug>] |
470 | 470 | ||
471 | cpia_pp= [HW,PPT] | ||
472 | Format: { parport<nr> | auto | none } | ||
473 | |||
474 | crashkernel=nn[KMG]@ss[KMG] | 471 | crashkernel=nn[KMG]@ss[KMG] |
475 | [KNL] Reserve a chunk of physical memory to | 472 | [KNL] Reserve a chunk of physical memory to |
476 | hold a kernel to switch to with kexec on panic. | 473 | hold a kernel to switch to with kexec on panic. |
@@ -1465,7 +1462,7 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1465 | 1462 | ||
1466 | reboot= [BUGS=X86-32,BUGS=ARM,BUGS=IA-64] Rebooting mode | 1463 | reboot= [BUGS=X86-32,BUGS=ARM,BUGS=IA-64] Rebooting mode |
1467 | Format: <reboot_mode>[,<reboot_mode2>[,...]] | 1464 | Format: <reboot_mode>[,<reboot_mode2>[,...]] |
1468 | See arch/*/kernel/reboot.c or arch/*/kernel/process.c | 1465 | See arch/*/kernel/reboot.c or arch/*/kernel/process.c |
1469 | 1466 | ||
1470 | reserve= [KNL,BUGS] Force the kernel to ignore some iomem area | 1467 | reserve= [KNL,BUGS] Force the kernel to ignore some iomem area |
1471 | 1468 | ||
@@ -1553,12 +1550,12 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1553 | 1550 | ||
1554 | selinux_compat_net = | 1551 | selinux_compat_net = |
1555 | [SELINUX] Set initial selinux_compat_net flag value. | 1552 | [SELINUX] Set initial selinux_compat_net flag value. |
1556 | Format: { "0" | "1" } | 1553 | Format: { "0" | "1" } |
1557 | 0 -- use new secmark-based packet controls | 1554 | 0 -- use new secmark-based packet controls |
1558 | 1 -- use legacy packet controls | 1555 | 1 -- use legacy packet controls |
1559 | Default value is 0 (preferred). | 1556 | Default value is 0 (preferred). |
1560 | Value can be changed at runtime via | 1557 | Value can be changed at runtime via |
1561 | /selinux/compat_net. | 1558 | /selinux/compat_net. |
1562 | 1559 | ||
1563 | serialnumber [BUGS=X86-32] | 1560 | serialnumber [BUGS=X86-32] |
1564 | 1561 | ||
@@ -1957,7 +1954,7 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1957 | norandmaps Don't use address space randomization | 1954 | norandmaps Don't use address space randomization |
1958 | Equivalent to echo 0 > /proc/sys/kernel/randomize_va_space | 1955 | Equivalent to echo 0 > /proc/sys/kernel/randomize_va_space |
1959 | 1956 | ||
1960 | unwind_debug=N N > 0 will enable dwarf2 unwinder debugging | 1957 | unwind_debug=N N > 0 will enable dwarf2 unwinder debugging |
1961 | This is useful to get more information why | 1958 | This is useful to get more information why |
1962 | you got a "dwarf2 unwinder stuck" | 1959 | you got a "dwarf2 unwinder stuck" |
1963 | 1960 | ||
diff --git a/Documentation/video4linux/cx2341x/fw-encoder-api.txt b/Documentation/video4linux/cx2341x/fw-encoder-api.txt index 5dd3109a8b3f..5a27af2ee1c6 100644 --- a/Documentation/video4linux/cx2341x/fw-encoder-api.txt +++ b/Documentation/video4linux/cx2341x/fw-encoder-api.txt | |||
@@ -407,8 +407,10 @@ Description | |||
407 | u32 length; // Length of this frame | 407 | u32 length; // Length of this frame |
408 | u32 offset_low; // Offset in the file of the | 408 | u32 offset_low; // Offset in the file of the |
409 | u32 offset_high; // start of this frame | 409 | u32 offset_high; // start of this frame |
410 | u32 mask1; // Bits 0-1 are the type mask: | 410 | u32 mask1; // Bits 0-2 are the type mask: |
411 | // 1=I, 2=P, 4=B | 411 | // 1=I, 2=P, 4=B |
412 | // 0=End of Program Index, other fields | ||
413 | // are invalid. | ||
412 | u32 pts; // The PTS of the frame | 414 | u32 pts; // The PTS of the frame |
413 | u32 mask2; // Bit 0 is bit 32 of the pts. | 415 | u32 mask2; // Bit 0 is bit 32 of the pts. |
414 | }; | 416 | }; |
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/include/media/v4l2-dev.h b/include/media/v4l2-dev.h index d62847f846c2..17f8f3a2f0a3 100644 --- a/include/media/v4l2-dev.h +++ b/include/media/v4l2-dev.h | |||
@@ -337,6 +337,9 @@ void *priv; | |||
337 | struct class_device class_dev; /* sysfs */ | 337 | struct class_device class_dev; /* sysfs */ |
338 | }; | 338 | }; |
339 | 339 | ||
340 | /* Class-dev to video-device */ | ||
341 | #define to_video_device(cd) container_of(cd, struct video_device, class_dev) | ||
342 | |||
340 | /* Version 2 functions */ | 343 | /* Version 2 functions */ |
341 | extern int video_register_device(struct video_device *vfd, int type, int nr); | 344 | extern int video_register_device(struct video_device *vfd, int type, int nr); |
342 | void video_unregister_device(struct video_device *); | 345 | void video_unregister_device(struct video_device *); |
@@ -354,11 +357,9 @@ extern int video_usercopy(struct inode *inode, struct file *file, | |||
354 | int (*func)(struct inode *inode, struct file *file, | 357 | int (*func)(struct inode *inode, struct file *file, |
355 | unsigned int cmd, void *arg)); | 358 | unsigned int cmd, void *arg)); |
356 | 359 | ||
357 | |||
358 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | 360 | #ifdef CONFIG_VIDEO_V4L1_COMPAT |
359 | #include <linux/mm.h> | 361 | #include <linux/mm.h> |
360 | 362 | ||
361 | #define to_video_device(cd) container_of(cd, struct video_device, class_dev) | ||
362 | static inline int __must_check | 363 | static inline int __must_check |
363 | video_device_create_file(struct video_device *vfd, | 364 | video_device_create_file(struct video_device *vfd, |
364 | struct class_device_attribute *attr) | 365 | struct class_device_attribute *attr) |