static int saa_num = 0; /* number of SAA7146s in use */
static int video_nr = -1;
-MODULE_PARM(video_nr,"i");
+module_param(video_nr, int, 0);
MODULE_LICENSE("GPL");
#define debAudio (NewCard ? nDebAudio : oDebAudio)
#define debDMA (NewCard ? nDebDMA : oDebDMA)
-#ifdef DEBUG
-int stradis_driver(void) /* for the benefit of ksymoops */
-{
- return 1;
-}
-#endif
-
#ifdef USE_RESCUE_EEPROM_SDM275
static unsigned char rescue_eeprom[64] = {
0x00,0x01,0x04,0x13,0x26,0x0f,0x10,0x00,0x00,0x00,0x43,0x63,0x22,0x01,0x29,0x15,0x73,0x00,0x1f, 'd', 'e', 'c', 'x', 'l', 'd', 'v', 'a',0x02,0x00,0x01,0x00,0xcc,0xa4,0x63,0x09,0xe2,0x10,0x00,0x0a,0x00,0x02,0x02, 'd', 'e', 'c', 'x', 'l', 'a',0x00,0x00,0x42,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
unsigned int cmd, unsigned long argl)
{
struct saa7146 *saa = file->private_data;
- void *arg = (void *)argl;
+ void __user *arg = (void __user *)argl;
switch (cmd) {
case VIDIOCGCAP:
vu.radio = VIDEO_NO_UNIT;
vu.audio = VIDEO_NO_UNIT;
vu.teletext = VIDEO_NO_UNIT;
- if (copy_to_user((void *) arg, (void *) &vu, sizeof(vu)))
+ if (copy_to_user(arg, &vu, sizeof(vu)))
return -EFAULT;
return 0;
}
struct video_code ucode;
__u8 *udata;
int i;
- if (copy_from_user((void *) &ucode, arg,
- sizeof(ucode)))
+ if (copy_from_user(&ucode, arg, sizeof(ucode)))
return -EFAULT;
if (ucode.datasize > 65536 || ucode.datasize < 1024 ||
strncmp(ucode.loadwhat, "dec", 3))
return -EINVAL;
if ((udata = vmalloc(ucode.datasize)) == NULL)
return -ENOMEM;
- if (copy_from_user((void *) udata, ucode.data,
- ucode.datasize)) {
+ if (copy_from_user(udata, ucode.data, ucode.datasize)) {
vfree(udata);
return -EFAULT;
}
return -EINVAL;
}
-static ssize_t saa_read(struct file *file, char *buf,
+static ssize_t saa_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos)
{
return -EINVAL;
}
-static ssize_t saa_write(struct file *file, const char *buf,
+static ssize_t saa_write(struct file *file, const char __user *buf,
size_t count, loff_t *ppos)
{
struct saa7146 *saa = file->private_data;
/* unmap and free memory */
saa->audhead = saa->audtail = saa->osdhead = 0;
saa->vidhead = saa->vidtail = saa->osdtail = 0;
- if (saa->vidbuf)
- vfree(saa->vidbuf);
- if (saa->audbuf)
- vfree(saa->audbuf);
- if (saa->osdbuf)
- vfree(saa->osdbuf);
+ vfree(saa->vidbuf);
+ vfree(saa->audbuf);
+ vfree(saa->osdbuf);
if (saa->dmavid2)
kfree((void *) saa->dmavid2);
saa->audbuf = saa->vidbuf = saa->osdbuf = NULL;