コード例 #1
0
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;
}
コード例 #2
0
ファイル: pms.c プロジェクト: Antonio-Zhou/Linux-2.6.11
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;
}