static long pms_read(struct video_device *v, char *buf, unsigned long count, int noblock) { struct pms_device *pd=(struct pms_device *)v; int len; /* FIXME: semaphore this */ len=pms_capture(pd, buf, (pd->picture.depth==16)?0:1,count); return len; }
static ssize_t pms_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) { struct video_device *v = video_devdata(file); struct pms_device *pd=(struct pms_device *)v; int len; down(&pd->lock); len=pms_capture(pd, buf, (pd->picture.depth==16)?0:1,count); up(&pd->lock); return len; }