{
struct cg14_par *par = (struct cg14_par *) info->par;
struct cg14_regs *regs = par->regs;
- struct mdi_cfginfo kmdi, *mdii;
+ struct mdi_cfginfo kmdi, __user *mdii;
unsigned long flags;
int cur_mode, mode, ret = 0;
kmdi.mdi_size = par->ramsize;
spin_unlock_irqrestore(&par->lock, flags);
- mdii = (struct mdi_cfginfo *) arg;
+ mdii = (struct mdi_cfginfo __user *) arg;
if (copy_to_user(mdii, &kmdi, sizeof(kmdi)))
ret = -EFAULT;
break;
case MDI_SET_PIXELMODE:
- if (get_user(mode, (int *) arg)) {
+ if (get_user(mode, (int __user *) arg)) {
ret = -EFAULT;
break;
}
all->par.mode = MDI_8_PIX;
all->par.ramsize = (is_8mb ? 0x800000 : 0x400000);
- all->info.flags = FBINFO_FLAG_DEFAULT;
+ all->info.flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
all->info.fbops = &cg14_ops;
all->info.currcon = -1;
all->info.par = &all->par;
struct sbus_bus *sbus;
struct sbus_dev *sdev;
+ if (fb_get_options("cg14fb", NULL))
+ return -ENODEV;
+
#ifdef CONFIG_SPARC32
{
int root, node;
return 0;
}
-#ifdef MODULE
module_init(cg14_init);
+
+#ifdef MODULE
module_exit(cg14_exit);
#endif