static unsigned int yieldlines=4; /* Yield after this many during capture */
static int video_nr = -1;
-MODULE_PARM(maxpoll,"i");
-MODULE_PARM(yieldlines,"i");
-MODULE_PARM(video_nr,"i");
+module_param(maxpoll, int, 0);
+module_param(yieldlines, int, 0);
+module_param(video_nr, int, 0);
static inline int read_lpstatus(struct qcam_device *q)
{
return parport_read_status(q->pport);
}
-static inline int read_lpcontrol(struct qcam_device *q)
-{
- return parport_read_control(q->pport);
-}
-
static inline int read_lpdata(struct qcam_device *q)
{
return parport_read_data(q->pport);
if(runs++>maxpoll)
{
- current->state=TASK_INTERRUPTIBLE;
- schedule_timeout(HZ/200);
+ msleep_interruptible(5);
}
if(runs>(maxpoll+1000)) /* 5 seconds */
return -1;
if(runs++>maxpoll)
{
- current->state=TASK_INTERRUPTIBLE;
- schedule_timeout(HZ/200);
+ msleep_interruptible(5);
}
if(runs++>(maxpoll+1000)) /* 5 seconds */
return -1;
if(runs++>maxpoll)
{
- current->state=TASK_INTERRUPTIBLE;
- schedule_timeout(HZ/200);
+ msleep_interruptible(5);
}
if(runs++>(maxpoll+1000)) /* 5 seconds */
return 0;
/* Reset the QuickCam and program for brightness, contrast,
* white-balance, and resolution. */
-void qc_set(struct qcam_device *q)
+static void qc_set(struct qcam_device *q)
{
int val;
int val2;
* n=2^(bit depth)-1. Ask me for more details if you don't understand
* this. */
-long qc_capture(struct qcam_device * q, char *buf, unsigned long len)
+static long qc_capture(struct qcam_device * q, char __user *buf, unsigned long len)
{
int i, j, k, yield;
int bytes;
}
pixels_read += bytes;
}
- (void) qc_readbytes(q, 0); /* reset state machine */
+ (void) qc_readbytes(q, NULL); /* reset state machine */
/* Grabbing an entire frame from the quickcam is a lengthy
process. We don't (usually) want to busy-block the
time will be 240 / 200 = 1.2 seconds. The compile-time
default is to yield every 4 lines. */
if (i >= yield) {
- current->state=TASK_INTERRUPTIBLE;
- schedule_timeout(HZ/200);
+ msleep_interruptible(5);
yield = i + yieldlines;
}
}
return video_usercopy(inode, file, cmd, arg, qcam_do_ioctl);
}
-static ssize_t qcam_read(struct file *file, char *buf,
+static ssize_t qcam_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos)
{
struct video_device *v = video_devdata(file);
.open = video_exclusive_open,
.release = video_exclusive_release,
.ioctl = qcam_ioctl,
+ .compat_ioctl = v4l_compat_ioctl32,
.read = qcam_read,
.llseek = no_llseek,
};
static struct qcam_device *qcams[MAX_CAMS];
static unsigned int num_cams = 0;
-int init_bwqcam(struct parport *port)
+static int init_bwqcam(struct parport *port)
{
struct qcam_device *qcam;
return 0;
}
-void close_bwqcam(struct qcam_device *qcam)
+static void close_bwqcam(struct qcam_device *qcam)
{
video_unregister_device(&qcam->vdev);
parport_unregister_device(qcam->pdev);
* -- March 14, 1999 Billy Donahue <billy@escape.com> */
#ifdef MODULE
static char *parport[MAX_CAMS] = { NULL, };
-MODULE_PARM(parport, "1-" __MODULE_STRING(MAX_CAMS) "s");
+module_param_array(parport, charp, NULL, 0);
#endif
static int accept_bwqcam(struct parport *port)