Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 181613
b: refs/heads/master
c: 831f476
h: refs/heads/master
i:
  181611: 1f74437
v: v3
  • Loading branch information
Andy Walls authored and Mauro Carvalho Chehab committed Feb 26, 2010
1 parent 2335e6e commit fb36215
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b4729dcbba5431bf636d3d6615709383ad5e0d34
refs/heads/master: 831f476cee704c37e7f96510135a90dfec6d00e9
18 changes: 5 additions & 13 deletions trunk/drivers/media/video/cx18/cx18-alsa-pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,28 +152,20 @@ static int snd_cx18_pcm_capture_open(struct snd_pcm_substream *substream)
struct v4l2_device *v4l2_dev = cxsc->v4l2_dev;
struct cx18 *cx = to_cx18(v4l2_dev);
struct cx18_stream *s;
struct cx18_open_id *item;
struct cx18_open_id item;
int ret;

/* Instruct the cx18 to start sending packets */
snd_cx18_lock(cxsc);
s = &cx->streams[CX18_ENC_STREAM_TYPE_PCM];

/* Allocate memory */
item = kmalloc(sizeof(struct cx18_open_id), GFP_KERNEL);
if (NULL == item) {
snd_cx18_unlock(cxsc);
return -ENOMEM;
}

item->cx = cx;
item->type = s->type;
item->open_id = cx->open_id++;
item.cx = cx;
item.type = s->type;
item.open_id = cx->open_id++;

/* See if the stream is available */
if (cx18_claim_stream(item, item->type)) {
if (cx18_claim_stream(&item, item.type)) {
/* No, it's already in use */
kfree(item);
snd_cx18_unlock(cxsc);
return -EBUSY;
}
Expand Down

0 comments on commit fb36215

Please sign in to comment.