fbtyp.fb_cmsize = info->cmap.len;
fbtyp.fb_size = info->fix.smem_len;
if (copy_to_user
- ((struct fbtype *) arg, &fbtyp, sizeof(fbtyp)))
+ ((struct fbtype __user *) arg, &fbtyp, sizeof(fbtyp)))
return -EFAULT;
break;
#endif /* __sparc__ */
case PBOOK_SLEEP_REJECT:
if (par->save_framebuffer) {
vfree(par->save_framebuffer);
- par->save_framebuffer = 0;
+ par->save_framebuffer = NULL;
}
break;
case PBOOK_SLEEP_NOW:
memcpy_toio((void *) info->screen_base,
par->save_framebuffer, nb);
vfree(par->save_framebuffer);
- par->save_framebuffer = 0;
+ par->save_framebuffer = NULL;
}
/* Restore display */
atyfb_set_par(info);
return 1;
}
-int __init atyfb_init(void)
+int __init atyfb_do_init(void)
{
#if defined(CONFIG_PCI)
unsigned long addr, res_start, res_size;
char prop[128];
int node, len, j;
u32 mem, chip_id;
+#else
+ u16 tmp;
+#endif
+#ifdef __sparc__
/* Do not attach when we have a serial console. */
if (!con_is_present())
return -ENXIO;
-#else
- u16 tmp;
#endif
while ((pdev =
return 0;
}
+int __init atyfb_init(void)
+{
+#ifndef MODULE
+ char *option = NULL;
+
+ if (fb_get_options("atyfb", &option))
+ return -ENODEV;
+ atyfb_setup(option);
+#endif
+ return atyfb_do_init();
+}
+
+
#ifndef MODULE
int __init atyfb_setup(char *options)
{
}
return 0;
}
+module_init(atyfb_init);
#endif /* !MODULE */
#ifdef CONFIG_ATARI