aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/video/aty/radeon_base.c29
1 files changed, 20 insertions, 9 deletions
diff --git a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c
index e7e8b52014c3..8a7c04c35a75 100644
--- a/drivers/video/aty/radeon_base.c
+++ b/drivers/video/aty/radeon_base.c
@@ -2312,19 +2312,27 @@ static int radeonfb_pci_register (struct pci_dev *pdev,
2312 rinfo->mmio_base_phys = pci_resource_start (pdev, 2); 2312 rinfo->mmio_base_phys = pci_resource_start (pdev, 2);
2313 2313
2314 /* request the mem regions */ 2314 /* request the mem regions */
2315 ret = pci_request_regions(pdev, "radeonfb"); 2315 ret = pci_request_region(pdev, 0, "radeonfb framebuffer");
2316 if (ret < 0) { 2316 if (ret < 0) {
2317 printk( KERN_ERR "radeonfb (%s): cannot reserve PCI regions." 2317 printk( KERN_ERR "radeonfb (%s): cannot request region 0.\n",
2318 " Someone already got them?\n", pci_name(rinfo->pdev)); 2318 pci_name(rinfo->pdev));
2319 goto err_release_fb; 2319 goto err_release_fb;
2320 } 2320 }
2321 2321
2322 ret = pci_request_region(pdev, 2, "radeonfb mmio");
2323 if (ret < 0) {
2324 printk( KERN_ERR "radeonfb (%s): cannot request region 2.\n",
2325 pci_name(rinfo->pdev));
2326 goto err_release_pci0;
2327 }
2328
2322 /* map the regions */ 2329 /* map the regions */
2323 rinfo->mmio_base = ioremap(rinfo->mmio_base_phys, RADEON_REGSIZE); 2330 rinfo->mmio_base = ioremap(rinfo->mmio_base_phys, RADEON_REGSIZE);
2324 if (!rinfo->mmio_base) { 2331 if (!rinfo->mmio_base) {
2325 printk(KERN_ERR "radeonfb (%s): cannot map MMIO\n", pci_name(rinfo->pdev)); 2332 printk(KERN_ERR "radeonfb (%s): cannot map MMIO\n",
2333 pci_name(rinfo->pdev));
2326 ret = -EIO; 2334 ret = -EIO;
2327 goto err_release_pci; 2335 goto err_release_pci2;
2328 } 2336 }
2329 2337
2330 rinfo->fb_local_base = INREG(MC_FB_LOCATION) << 16; 2338 rinfo->fb_local_base = INREG(MC_FB_LOCATION) << 16;
@@ -2499,10 +2507,12 @@ err_unmap_rom:
2499 if (rinfo->bios_seg) 2507 if (rinfo->bios_seg)
2500 radeon_unmap_ROM(rinfo, pdev); 2508 radeon_unmap_ROM(rinfo, pdev);
2501 iounmap(rinfo->mmio_base); 2509 iounmap(rinfo->mmio_base);
2502err_release_pci: 2510err_release_pci2:
2503 pci_release_regions(pdev); 2511 pci_release_region(pdev, 2);
2512err_release_pci0:
2513 pci_release_region(pdev, 0);
2504err_release_fb: 2514err_release_fb:
2505 framebuffer_release(info); 2515 framebuffer_release(info);
2506err_disable: 2516err_disable:
2507 pci_disable_device(pdev); 2517 pci_disable_device(pdev);
2508err_out: 2518err_out:
@@ -2548,7 +2558,8 @@ static void __devexit radeonfb_pci_unregister (struct pci_dev *pdev)
2548 iounmap(rinfo->mmio_base); 2558 iounmap(rinfo->mmio_base);
2549 iounmap(rinfo->fb_base); 2559 iounmap(rinfo->fb_base);
2550 2560
2551 pci_release_regions(pdev); 2561 pci_release_region(pdev, 2);
2562 pci_release_region(pdev, 0);
2552 2563
2553 kfree(rinfo->mon1_EDID); 2564 kfree(rinfo->mon1_EDID);
2554 kfree(rinfo->mon2_EDID); 2565 kfree(rinfo->mon2_EDID);