Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 43431
b: refs/heads/master
c: 75dcf5d
h: refs/heads/master
i:
  43429: b3e21ea
  43427: b3675a4
  43423: 2320b56
v: v3
  • Loading branch information
Daniel Drake authored and Stefan Richter committed Dec 7, 2006
1 parent cb79bba commit c1d287c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 25 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: 3c21cfc4babaf4d20384f6f70def308e9b945159
refs/heads/master: 75dcf5dc5a0dc4e895944368780cc2fc40008a55
30 changes: 6 additions & 24 deletions trunk/drivers/ieee1394/video1394.c
Original file line number Diff line number Diff line change
Expand Up @@ -714,8 +714,8 @@ static inline unsigned video1394_buffer_state(struct dma_iso_ctx *d,
return ret;
}

static int __video1394_ioctl(struct file *file,
unsigned int cmd, unsigned long arg)
static long video1394_ioctl(struct file *file,
unsigned int cmd, unsigned long arg)
{
struct file_ctx *ctx = (struct file_ctx *)file->private_data;
struct ti_ohci *ohci = ctx->ohci;
Expand Down Expand Up @@ -1158,15 +1158,6 @@ static int __video1394_ioctl(struct file *file,
}
}

static long video1394_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
int err;
lock_kernel();
err = __video1394_ioctl(file, cmd, arg);
unlock_kernel();
return err;
}

/*
* This maps the vmalloced and reserved buffer to user space.
*
Expand All @@ -1179,17 +1170,14 @@ static long video1394_ioctl(struct file *file, unsigned int cmd, unsigned long a
static int video1394_mmap(struct file *file, struct vm_area_struct *vma)
{
struct file_ctx *ctx = (struct file_ctx *)file->private_data;
int res = -EINVAL;

lock_kernel();
if (ctx->current_ctx == NULL) {
PRINT(KERN_ERR, ctx->ohci->host->id,
"Current iso context not set");
} else
res = dma_region_mmap(&ctx->current_ctx->dma, file, vma);
unlock_kernel();
return -EINVAL;
}

return res;
return dma_region_mmap(&ctx->current_ctx->dma, file, vma);
}

static unsigned int video1394_poll(struct file *file, poll_table *pt)
Expand All @@ -1200,14 +1188,12 @@ static unsigned int video1394_poll(struct file *file, poll_table *pt)
struct dma_iso_ctx *d;
int i;

lock_kernel();
ctx = file->private_data;
d = ctx->current_ctx;
if (d == NULL) {
PRINT(KERN_ERR, ctx->ohci->host->id,
"Current iso context not set");
mask = POLLERR;
goto done;
return POLLERR;
}

poll_wait(file, &d->waitq, pt);
Expand All @@ -1220,8 +1206,6 @@ static unsigned int video1394_poll(struct file *file, poll_table *pt)
}
}
spin_unlock_irqrestore(&d->lock, flags);
done:
unlock_kernel();

return mask;
}
Expand Down Expand Up @@ -1257,7 +1241,6 @@ static int video1394_release(struct inode *inode, struct file *file)
struct list_head *lh, *next;
u64 mask;

lock_kernel();
list_for_each_safe(lh, next, &ctx->context_list) {
struct dma_iso_ctx *d;
d = list_entry(lh, struct dma_iso_ctx, link);
Expand All @@ -1278,7 +1261,6 @@ static int video1394_release(struct inode *inode, struct file *file)
kfree(ctx);
file->private_data = NULL;

unlock_kernel();
return 0;
}

Expand Down

0 comments on commit c1d287c

Please sign in to comment.