Skip to content

Commit

Permalink
Merge branch 'master' of ssh://master.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/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
  • Loading branch information
Linus Torvalds committed Sep 14, 2007
2 parents 7a1fa06 + e90ff92 commit 44e3ff3
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 33 deletions.
23 changes: 10 additions & 13 deletions Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Kernel Parameters
~~~~~~~~~~~~~~~~~
Kernel Parameters
~~~~~~~~~~~~~~~~~

The following is a consolidated list of the kernel parameters as implemented
(mostly) by the __setup() macro and sorted into English Dictionary order
Expand Down Expand Up @@ -468,9 +468,6 @@ and is between 256 and 4096 characters. It is defined in the file
Format:
<first_slot>,<last_slot>,<port>,<enum_bit>[,<debug>]

cpia_pp= [HW,PPT]
Format: { parport<nr> | auto | none }

crashkernel=nn[KMG]@ss[KMG]
[KNL] Reserve a chunk of physical memory to
hold a kernel to switch to with kexec on panic.
Expand Down Expand Up @@ -1465,7 +1462,7 @@ and is between 256 and 4096 characters. It is defined in the file

reboot= [BUGS=X86-32,BUGS=ARM,BUGS=IA-64] Rebooting mode
Format: <reboot_mode>[,<reboot_mode2>[,...]]
See arch/*/kernel/reboot.c or arch/*/kernel/process.c
See arch/*/kernel/reboot.c or arch/*/kernel/process.c

reserve= [KNL,BUGS] Force the kernel to ignore some iomem area

Expand Down Expand Up @@ -1553,12 +1550,12 @@ and is between 256 and 4096 characters. It is defined in the file

selinux_compat_net =
[SELINUX] Set initial selinux_compat_net flag value.
Format: { "0" | "1" }
0 -- use new secmark-based packet controls
1 -- use legacy packet controls
Default value is 0 (preferred).
Value can be changed at runtime via
/selinux/compat_net.
Format: { "0" | "1" }
0 -- use new secmark-based packet controls
1 -- use legacy packet controls
Default value is 0 (preferred).
Value can be changed at runtime via
/selinux/compat_net.

serialnumber [BUGS=X86-32]

Expand Down Expand Up @@ -1957,7 +1954,7 @@ and is between 256 and 4096 characters. It is defined in the file
norandmaps Don't use address space randomization
Equivalent to echo 0 > /proc/sys/kernel/randomize_va_space

unwind_debug=N N > 0 will enable dwarf2 unwinder debugging
unwind_debug=N N > 0 will enable dwarf2 unwinder debugging
This is useful to get more information why
you got a "dwarf2 unwinder stuck"

Expand Down
4 changes: 3 additions & 1 deletion Documentation/video4linux/cx2341x/fw-encoder-api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -407,8 +407,10 @@ Description
u32 length; // Length of this frame
u32 offset_low; // Offset in the file of the
u32 offset_high; // start of this frame
u32 mask1; // Bits 0-1 are the type mask:
u32 mask1; // Bits 0-2 are the type mask:
// 1=I, 2=P, 4=B
// 0=End of Program Index, other fields
// are invalid.
u32 pts; // The PTS of the frame
u32 mask2; // Bit 0 is bit 32 of the pts.
};
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/video/cx88/cx88-mpeg.c
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ struct cx8802_dev * cx8802_get_device(struct inode *inode)

list_for_each(list,&cx8802_devlist) {
h = list_entry(list, struct cx8802_dev, devlist);
if (h->mpeg_dev->minor == minor)
if (h->mpeg_dev && h->mpeg_dev->minor == minor)
return h;
}

Expand Down
6 changes: 4 additions & 2 deletions drivers/media/video/ivtv/ivtv-fileops.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,9 @@ static void ivtv_update_pgm_info(struct ivtv *itv)
int idx = (itv->pgm_info_write_idx + i) % itv->pgm_info_num;
struct v4l2_enc_idx_entry *e = itv->pgm_info + idx;
u32 addr = itv->pgm_info_offset + 4 + idx * 24;
const int mapping[] = { V4L2_ENC_IDX_FRAME_P, V4L2_ENC_IDX_FRAME_I, V4L2_ENC_IDX_FRAME_B, 0 };
const int mapping[8] = { -1, V4L2_ENC_IDX_FRAME_I, V4L2_ENC_IDX_FRAME_P, -1,
V4L2_ENC_IDX_FRAME_B, -1, -1, -1 };
// 1=I, 2=P, 4=B

e->offset = read_enc(addr + 4) + ((u64)read_enc(addr + 8) << 32);
if (e->offset > itv->mpg_data_received) {
Expand All @@ -199,7 +201,7 @@ static void ivtv_update_pgm_info(struct ivtv *itv)
e->offset += itv->vbi_data_inserted;
e->length = read_enc(addr);
e->pts = read_enc(addr + 16) + ((u64)(read_enc(addr + 20) & 1) << 32);
e->flags = mapping[read_enc(addr + 12) & 3];
e->flags = mapping[read_enc(addr + 12) & 7];
i++;
}
itv->pgm_info_write_idx = (itv->pgm_info_write_idx + i) % itv->pgm_info_num;
Expand Down
17 changes: 12 additions & 5 deletions drivers/media/video/ivtv/ivtv-ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1099,14 +1099,21 @@ int ivtv_v4l2_ioctls(struct ivtv *itv, struct file *filp, unsigned int cmd, void

case VIDIOC_G_ENC_INDEX: {
struct v4l2_enc_idx *idx = arg;
struct v4l2_enc_idx_entry *e = idx->entry;
int entries;
int i;

idx->entries = (itv->pgm_info_write_idx + IVTV_MAX_PGM_INDEX - itv->pgm_info_read_idx) %
entries = (itv->pgm_info_write_idx + IVTV_MAX_PGM_INDEX - itv->pgm_info_read_idx) %
IVTV_MAX_PGM_INDEX;
if (idx->entries > V4L2_ENC_IDX_ENTRIES)
idx->entries = V4L2_ENC_IDX_ENTRIES;
for (i = 0; i < idx->entries; i++) {
idx->entry[i] = itv->pgm_info[(itv->pgm_info_read_idx + i) % IVTV_MAX_PGM_INDEX];
if (entries > V4L2_ENC_IDX_ENTRIES)
entries = V4L2_ENC_IDX_ENTRIES;
idx->entries = 0;
for (i = 0; i < entries; i++) {
*e = itv->pgm_info[(itv->pgm_info_read_idx + i) % IVTV_MAX_PGM_INDEX];
if ((e->flags & V4L2_ENC_IDX_FRAME_MASK) <= V4L2_ENC_IDX_FRAME_B) {
idx->entries++;
e++;
}
}
itv->pgm_info_read_idx = (itv->pgm_info_read_idx + idx->entries) % IVTV_MAX_PGM_INDEX;
break;
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/video/pwc/pwc-if.c
Original file line number Diff line number Diff line change
Expand Up @@ -1243,7 +1243,7 @@ static int pwc_video_close(struct inode *inode, struct file *file)
PWC_ERROR("Failed to power down camera (%d)\n", i);
}
pdev->vopen--;
PWC_DEBUG_OPEN("<< video_close() vopen=%d\n", i);
PWC_DEBUG_OPEN("<< video_close() vopen=%d\n", pdev->vopen);
} else {
pwc_cleanup(pdev);
/* Free memory (don't set pdev to 0 just yet) */
Expand Down
12 changes: 6 additions & 6 deletions drivers/media/video/saa7134/saa7134-cards.c
Original file line number Diff line number Diff line change
Expand Up @@ -1537,18 +1537,18 @@ struct saa7134_board saa7134_boards[] = {
},{
.name = name_comp1,
.vmux = 0,
.amux = LINE2,
.gpio = 0x00,
.amux = LINE1,
.gpio = 0x02,
},{
.name = name_comp2,
.vmux = 3,
.amux = LINE2,
.gpio = 0x00,
.amux = LINE1,
.gpio = 0x02,
},{
.name = name_svideo,
.vmux = 8,
.amux = LINE2,
.gpio = 0x00,
.amux = LINE1,
.gpio = 0x02,
}},
.radio = {
.name = name_radio,
Expand Down
4 changes: 2 additions & 2 deletions drivers/media/video/saa7191.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ static int saa7191_write_reg(struct i2c_client *client, u8 reg,

/* the first byte of data must be the first subaddress number (register) */
static int saa7191_write_block(struct i2c_client *client,
u8 length, u8 *data)
u8 length, const u8 *data)
{
int i;
int ret;
Expand Down Expand Up @@ -592,7 +592,7 @@ static int saa7191_attach(struct i2c_adapter *adap, int addr, int kind)
if (err)
goto out_free_decoder;

err = saa7191_write_block(client, sizeof(initseq), (u8 *)initseq);
err = saa7191_write_block(client, sizeof(initseq), initseq);
if (err) {
printk(KERN_ERR "SAA7191 initialization failed\n");
goto out_detach_client;
Expand Down
5 changes: 3 additions & 2 deletions include/media/v4l2-dev.h
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,9 @@ void *priv;
struct class_device class_dev; /* sysfs */
};

/* Class-dev to video-device */
#define to_video_device(cd) container_of(cd, struct video_device, class_dev)

/* Version 2 functions */
extern int video_register_device(struct video_device *vfd, int type, int nr);
void video_unregister_device(struct video_device *);
Expand All @@ -354,11 +357,9 @@ extern int video_usercopy(struct inode *inode, struct file *file,
int (*func)(struct inode *inode, struct file *file,
unsigned int cmd, void *arg));


#ifdef CONFIG_VIDEO_V4L1_COMPAT
#include <linux/mm.h>

#define to_video_device(cd) container_of(cd, struct video_device, class_dev)
static inline int __must_check
video_device_create_file(struct video_device *vfd,
struct class_device_attribute *attr)
Expand Down

0 comments on commit 44e3ff3

Please sign in to comment.