diff options
author | Krzysztof Helt <krzysztof.h1@wp.pl> | 2008-10-16 01:03:38 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-16 14:21:43 -0400 |
commit | 64beab14f53790e59a4e0a9ef1d752c12ad54a62 (patch) | |
tree | 5b2d8198af1f94ca2bbe4671483da0223df20c42 /drivers/video/cirrusfb.c | |
parent | 1cea9a9a6c3c718eea42f6a936d1e98136d3d011 (diff) |
cirrusfb: drop device pointers from cirrusfb_info
The device pointer can be easily obtained from fb_info->device if needed.
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/cirrusfb.c')
-rw-r--r-- | drivers/video/cirrusfb.c | 20 |
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 | ||
2184 | static void cirrusfb_pci_unmap(struct fb_info *info) | 2177 | static 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) | |||
2200 | static void __devexit cirrusfb_zorro_unmap(struct fb_info *info) | 2192 | static 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; |