X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fvideo%2Fkyro%2Ffbdev.c;h=8639b25f39b5607c30d3d03403a2a52e89c21072;hb=9c920a8402f2bb9bd931801d429b65f4eb6a262b;hp=ad74caab223d9cb0e8be6dea366607fedc925e11;hpb=a91482bdcc2e0f6035702e46f1b99043a0893346;p=linux-2.6.git diff --git a/drivers/video/kyro/fbdev.c b/drivers/video/kyro/fbdev.c index ad74caab2..8639b25f3 100644 --- a/drivers/video/kyro/fbdev.c +++ b/drivers/video/kyro/fbdev.c @@ -84,7 +84,7 @@ typedef struct { } device_info_t; /* global graphics card info structure (one per card) */ -static device_info_t deviceInfo; +static device_info_t deviceInfo = { 0 }; static char *mode_option __initdata = NULL; static int nopan __initdata = 0; @@ -97,6 +97,7 @@ static int nomtrr __initdata = 0; static int kyrofb_probe(struct pci_dev *pdev, const struct pci_device_id *ent); static void kyrofb_remove(struct pci_dev *pdev); +#ifndef MODULE static struct fb_videomode kyro_modedb[] __initdata = { { /* 640x350 @ 85Hz */ @@ -305,6 +306,7 @@ enum { VMODE_1920_1440_60, VMODE_1920_1440_75, }; +#endif /* Accessors */ int kyro_dev_video_mode_set(struct fb_info *info) @@ -720,8 +722,10 @@ static int __devinit kyrofb_probe(struct pci_dev *pdev, deviceInfo.ulOverlayOffset = 0; /* This should give a reasonable default video mode */ +#ifndef MODULE if (!fb_find_mode(&info->var, info, mode_option, kyro_modedb, NUM_TOTAL_MODES, &kyro_modedb[VMODE_1024_768_75], 32)) +#endif info->var = kyro_var; fb_alloc_cmap(&info->cmap, 256, 0); @@ -733,7 +737,7 @@ static int __devinit kyrofb_probe(struct pci_dev *pdev, info->var.bits_per_pixel); size *= info->var.yres_virtual; - fb_memset(info->screen_base, 0, size); + memset_io((unsigned long)info->screen_base, 0, size); if (register_framebuffer(info) < 0) goto out_unmap;