* (which, incidentally, is about the same saving as a 2.5in hard disk
* entering standby mode.)
*/
-#include <linux/config.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/mm.h>
-#include <linux/tty.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/fb.h>
#include <linux/init.h>
#include <asm/io.h>
-#include <asm/irq.h>
#include <asm/pgtable.h>
#include <asm/system.h>
#include <asm/uaccess.h>
*/
u_char ramdac_ctrl;
u_char ramdac_powerdown;
+
+ u32 pseudo_palette[16];
};
-static char default_font_storage[40];
static char *default_font = "Acorn8x8";
module_param(default_font, charp, 0);
MODULE_PARM_DESC(default_font, "Default font name");
.fb_fillrect = cyber2000fb_fillrect,
.fb_copyarea = cyber2000fb_copyarea,
.fb_imageblit = cyber2000fb_imageblit,
- .fb_cursor = soft_cursor,
.fb_sync = cyber2000fb_sync,
};
{
struct cfb_info *cfb;
- cfb = kmalloc(sizeof(struct cfb_info) +
- sizeof(u32) * 16, GFP_KERNEL);
-
+ cfb = kmalloc(sizeof(struct cfb_info), GFP_KERNEL);
if (!cfb)
return NULL;
cfb->fb.fbops = &cyber2000fb_ops;
cfb->fb.flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
- cfb->fb.pseudo_palette = (void *)(cfb + 1);
+ cfb->fb.pseudo_palette = cfb->pseudo_palette;
fb_alloc_cmap(&cfb->fb.cmap, NR_PALETTE, 0);
* Parse Cyber2000fb options. Usage:
* video=cyber2000:font:fontname
*/
-int
+#ifndef MODULE
+static int
cyber2000fb_setup(char *options)
{
char *opt;
continue;
if (strncmp(opt, "font:", 5) == 0) {
+ static char default_font_storage[40];
+
strlcpy(default_font_storage, opt + 5, sizeof(default_font_storage));
default_font = default_font_storage;
continue;
}
return 0;
}
+#endif /* MODULE */
/*
* The CyberPro chips can be placed on many different bus types.
* I/O cycles storing into a reserved memory space at
* physical address 0x3000000
*/
- unsigned char *iop;
+ unsigned char __iomem *iop;
iop = ioremap(0x3000000, 0x5000);
if (iop == NULL) {
writeb(EXT_BIU_MISC, iop + 0x3ce);
writeb(EXT_BIU_MISC_LIN_ENABLE, iop + 0x3cf);
- iounmap((void *)iop);
+ iounmap(iop);
#else
/*
* Most other machine types are "normal", so
}
}
-static int cyberpro_pci_suspend(struct pci_dev *dev, u32 state)
+static int cyberpro_pci_suspend(struct pci_dev *dev, pm_message_t state)
{
return 0;
}
*
* Tony: "module_init" is now required
*/
-int __init cyber2000fb_init(void)
+static int __init cyber2000fb_init(void)
{
int ret = -1, err;
}
#endif
#ifdef CONFIG_PCI
- err = pci_module_init(&cyberpro_driver);
+ err = pci_register_driver(&cyberpro_driver);
if (!err)
ret = 0;
#endif