devc->v_alloc->max_voice = devc->nr_voice = 12;
}
-static int opl3_ioctl(int dev, unsigned int cmd, caddr_t arg)
+static int opl3_ioctl(int dev, unsigned int cmd, void __user * arg)
{
struct sbi_instrument ins;
{
}
-static int opl3_load_patch(int dev, int format, const char *addr,
+static int opl3_load_patch(int dev, int format, const char __user *addr,
int offs, int count, int pmgr_flag)
{
struct sbi_instrument ins;
return -EINVAL;
}
- if(copy_from_user(&((char *) &ins)[offs], &(addr)[offs], sizeof(ins) - offs))
+ /*
+ * What the fuck is going on here? We leave junk in the beginning
+ * of ins and then check the field pretty close to that beginning?
+ */
+ if(copy_from_user(&((char *) &ins)[offs], addr + offs, sizeof(ins) - offs))
return -EFAULT;
if (ins.channel < 0 || ins.channel >= SBFM_MAXINSTR)
static int io = -1;
-MODULE_PARM(io, "i");
+module_param(io, int, 0);
static int __init init_opl3 (void)
{