X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fvideo%2Faty%2Faty128fb.c;h=f2d82d005f1249958977dc65fe15231d6e328b3a;hb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;hp=b19eded6cb8b7c4f70e8b0584ea2bbf20c648f4a;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c index b19eded6c..f2d82d005 100644 --- a/drivers/video/aty/aty128fb.c +++ b/drivers/video/aty/aty128fb.c @@ -924,7 +924,7 @@ static void __init aty128_get_pllinfo(struct aty128fb_par *par, unsigned char *b } -#ifdef __i386__ +#ifdef CONFIG_X86 static void * __devinit aty128_find_mem_vbios(struct aty128fb_par *par) { /* I simplified this code as we used to miss the signatures in @@ -946,7 +946,7 @@ static void * __devinit aty128_find_mem_vbios(struct aty128fb_par *par) } return rom_base; } -#endif /* __i386__ */ +#endif #endif /* ndef(__sparc__) */ /* fill in known card constants if pll_block is not available */ @@ -1950,7 +1950,7 @@ static int __init aty128_probe(struct pci_dev *pdev, const struct pci_device_id #ifndef __sparc__ bios = aty128_map_ROM(par, pdev); -#ifdef __i386__ +#ifdef CONFIG_X86 if (bios == NULL) bios = aty128_find_mem_vbios(par); #endif @@ -2149,7 +2149,7 @@ static int aty128fb_ioctl(struct inode *inode, struct file *file, u_int cmd, case FBIO_ATY128_SET_MIRROR: if (par->chip_gen != rage_M3) return -EINVAL; - rc = get_user(value, (__u32*)arg); + rc = get_user(value, (__u32 __user *)arg); if (rc) return rc; par->lcd_on = (value & 0x01) != 0; @@ -2163,7 +2163,7 @@ static int aty128fb_ioctl(struct inode *inode, struct file *file, u_int cmd, if (par->chip_gen != rage_M3) return -EINVAL; value = (par->crt_on << 1) | par->lcd_on; - return put_user(value, (__u32*)arg); + return put_user(value, (__u32 __user *)arg); } #endif return -EINVAL; @@ -2419,7 +2419,7 @@ static int aty128_pci_resume(struct pci_dev *pdev) wait_for_idle(par); aty128fb_set_par(info); fb_pan_display(info, &info->var); - fb_set_cmap(&info->cmap, 1, info); + fb_set_cmap(&info->cmap, info); /* Refresh */ fb_set_suspend(info, 0); @@ -2439,6 +2439,14 @@ static int aty128_pci_resume(struct pci_dev *pdev) int __init aty128fb_init(void) { +#ifndef MODULE + char *option = NULL; + + if (fb_get_options("aty128fb", &option)) + return -ENODEV; + aty128fb_setup(option); +#endif + return pci_module_init(&aty128fb_driver); } @@ -2447,8 +2455,9 @@ static void __exit aty128fb_exit(void) pci_unregister_driver(&aty128fb_driver); } -#ifdef MODULE module_init(aty128fb_init); + +#ifdef MODULE module_exit(aty128fb_exit); MODULE_AUTHOR("(c)1999-2003 Brad Douglas ");