struct file_ctx *ctx = (struct file_ctx *)file->private_data;
struct ti_ohci *ohci = ctx->ohci;
unsigned long flags;
+ void __user *argp = (void __user *)arg;
switch(cmd)
{
struct dma_iso_ctx *d;
int i;
- if (copy_from_user(&v, (void *)arg, sizeof(v)))
+ if (copy_from_user(&v, argp, sizeof(v)))
return -EFAULT;
/* if channel < 0, find lowest available one */
v.channel);
}
- if (copy_to_user((void *)arg, &v, sizeof(v)))
+ if (copy_to_user(argp, &v, sizeof(v)))
return -EFAULT;
return 0;
u64 mask;
struct dma_iso_ctx *d;
- if (copy_from_user(&channel, (void *)arg, sizeof(int)))
+ if (copy_from_user(&channel, argp, sizeof(int)))
return -EFAULT;
if (channel<0 || channel>(ISO_CHANNELS-1)) {
struct video1394_wait v;
struct dma_iso_ctx *d;
- if (copy_from_user(&v, (void *)arg, sizeof(v)))
+ if (copy_from_user(&v, argp, sizeof(v)))
return -EFAULT;
d = find_ctx(&ctx->context_list, OHCI_ISO_RECEIVE, v.channel);
struct dma_iso_ctx *d;
int i;
- if (copy_from_user(&v, (void *)arg, sizeof(v)))
+ if (copy_from_user(&v, argp, sizeof(v)))
return -EFAULT;
d = find_ctx(&ctx->context_list, OHCI_ISO_RECEIVE, v.channel);
spin_unlock_irqrestore(&d->lock, flags);
v.buffer=i;
- if (copy_to_user((void *)arg, &v, sizeof(v)))
+ if (copy_to_user(argp, &v, sizeof(v)))
return -EFAULT;
return 0;
qv.packet_sizes = NULL;
- if (copy_from_user(&v, (void *)arg, sizeof(v)))
+ if (copy_from_user(&v, argp, sizeof(v)))
return -EFAULT;
d = find_ctx(&ctx->context_list, OHCI_ISO_TRANSMIT, v.channel);
unsigned int *psizes;
int buf_size = d->nb_cmd * sizeof(unsigned int);
- if (copy_from_user(&qv, (void *)arg, sizeof(qv)))
+ if (copy_from_user(&qv, argp, sizeof(qv)))
return -EFAULT;
psizes = kmalloc(buf_size, GFP_KERNEL);
struct video1394_wait v;
struct dma_iso_ctx *d;
- if (copy_from_user(&v, (void *)arg, sizeof(v)))
+ if (copy_from_user(&v, argp, sizeof(v)))
return -EFAULT;
d = find_ctx(&ctx->context_list, OHCI_ISO_TRANSMIT, v.channel);