static int tosh_fn = 0;
-MODULE_PARM(tosh_fn, "i");
+module_param(tosh_fn, int, 0);
static int tosh_ioctl(struct inode *, struct file *, unsigned int,
unsigned long arg)
{
SMMRegisters regs;
+ SMMRegisters __user *argp = (SMMRegisters __user *)arg;
unsigned short ax,bx;
int err;
- if (!arg)
+ if (!argp)
return -EINVAL;
- if (copy_from_user(®s, (SMMRegisters *) arg, sizeof(SMMRegisters)))
+ if (copy_from_user(®s, argp, sizeof(SMMRegisters)))
return -EFAULT;
switch (cmd) {
return -EINVAL;
}
- if (copy_to_user((SMMRegisters *) arg, ®s, sizeof(SMMRegisters)))
+ if (copy_to_user(argp, ®s, sizeof(SMMRegisters)))
return -EFAULT;
return (err==0) ? 0:-EINVAL;
* laptop, otherwise zero and determines the Machine ID, BIOS version and
* date, and SCI version.
*/
-int tosh_probe(void)
+static int tosh_probe(void)
{
int i,major,minor,day,year,month,flag;
unsigned char signature[7] = { 0x54,0x4f,0x53,0x48,0x49,0x42,0x41 };