aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/cirrusfb.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/drivers/video/cirrusfb.c b/drivers/video/cirrusfb.c
index 4888ff69f802..0eb429a35732 100644
--- a/drivers/video/cirrusfb.c
+++ b/drivers/video/cirrusfb.c
@@ -367,15 +367,8 @@ struct cirrusfb_info {
367 367
368 struct cirrusfb_regs currentmode; 368 struct cirrusfb_regs currentmode;
369 int blank_mode; 369 int blank_mode;
370 u32 pseudo_palette[16];
370 371
371 u32 pseudo_palette[16];
372
373#ifdef CONFIG_ZORRO
374 struct zorro_dev *zdev;
375#endif
376#ifdef CONFIG_PCI
377 struct pci_dev *pdev;
378#endif
379 void (*unmap)(struct fb_info *info); 372 void (*unmap)(struct fb_info *info);
380}; 373};
381 374
@@ -2183,8 +2176,7 @@ static void get_pci_addrs(const struct pci_dev *pdev,
2183 2176
2184static void cirrusfb_pci_unmap(struct fb_info *info) 2177static void cirrusfb_pci_unmap(struct fb_info *info)
2185{ 2178{
2186 struct cirrusfb_info *cinfo = info->par; 2179 struct pci_dev *pdev = to_pci_dev(info->device);
2187 struct pci_dev *pdev = cinfo->pdev;
2188 2180
2189 iounmap(info->screen_base); 2181 iounmap(info->screen_base);
2190#if 0 /* if system didn't claim this region, we would... */ 2182#if 0 /* if system didn't claim this region, we would... */
@@ -2200,14 +2192,16 @@ static void cirrusfb_pci_unmap(struct fb_info *info)
2200static void __devexit cirrusfb_zorro_unmap(struct fb_info *info) 2192static void __devexit cirrusfb_zorro_unmap(struct fb_info *info)
2201{ 2193{
2202 struct cirrusfb_info *cinfo = info->par; 2194 struct cirrusfb_info *cinfo = info->par;
2203 zorro_release_device(cinfo->zdev); 2195 struct zorro_dev *zdev = to_zorro_dev(info->device);
2196
2197 zorro_release_device(zdev);
2204 2198
2205 if (cinfo->btype == BT_PICASSO4) { 2199 if (cinfo->btype == BT_PICASSO4) {
2206 cinfo->regbase -= 0x600000; 2200 cinfo->regbase -= 0x600000;
2207 iounmap((void *)cinfo->regbase); 2201 iounmap((void *)cinfo->regbase);
2208 iounmap(info->screen_base); 2202 iounmap(info->screen_base);
2209 } else { 2203 } else {
2210 if (zorro_resource_start(cinfo->zdev) > 0x01000000) 2204 if (zorro_resource_start(zdev) > 0x01000000)
2211 iounmap(info->screen_base); 2205 iounmap(info->screen_base);
2212 } 2206 }
2213} 2207}
@@ -2348,7 +2342,6 @@ static int cirrusfb_pci_register(struct pci_dev *pdev,
2348 } 2342 }
2349 2343
2350 cinfo = info->par; 2344 cinfo = info->par;
2351 cinfo->pdev = pdev;
2352 cinfo->btype = btype = (enum cirrus_board) ent->driver_data; 2345 cinfo->btype = btype = (enum cirrus_board) ent->driver_data;
2353 2346
2354 DPRINTK(" Found PCI device, base address 0 is 0x%x, btype set to %d\n", 2347 DPRINTK(" Found PCI device, base address 0 is 0x%x, btype set to %d\n",
@@ -2484,7 +2477,6 @@ static int cirrusfb_zorro_register(struct zorro_dev *z,
2484 assert(z); 2477 assert(z);
2485 assert(btype != BT_NONE); 2478 assert(btype != BT_NONE);
2486 2479
2487 cinfo->zdev = z;
2488 board_addr = zorro_resource_start(z); 2480 board_addr = zorro_resource_start(z);
2489 board_size = zorro_resource_len(z); 2481 board_size = zorro_resource_len(z);
2490 info->screen_size = size; 2482 info->screen_size = size;