patch-2.3.37 linux/drivers/video/pm2fb.c
Next file: linux/drivers/video/rivafb.c
Previous file: linux/drivers/video/offb.c
Back to the patch index
Back to the overall index
- Lines: 52
- Date:
Thu Jan 6 10:30:52 2000
- Orig file:
v2.3.36/linux/drivers/video/pm2fb.c
- Orig date:
Wed Dec 29 13:13:20 1999
diff -u --recursive --new-file v2.3.36/linux/drivers/video/pm2fb.c linux/drivers/video/pm2fb.c
@@ -921,8 +921,8 @@
DPRINTK("found board: %s\n", board_table[p->board].name);
p->regions.p_fb=p->regions.fb_base;
- if (!__request_region(&iomem_resource, p->regions.p_fb,
- p->regions.fb_size, "pm2fb")) {
+ if (!request_mem_region(p->regions.p_fb, p->regions.fb_size,
+ "pm2fb")) {
printk (KERN_ERR "pm2fb: cannot reserve fb memory, abort\n");
return 0;
}
@@ -933,8 +933,7 @@
#else
p->regions.p_regs=p->regions.rg_base+PM2_REGS_SIZE;
#endif
- if (!__request_region(&iomem_resource, p->regions.p_regs,
- PM2_REGS_SIZE, "pm2fb")) {
+ if (!request_mem_region(p->regions.p_regs, PM2_REGS_SIZE, "pm2fb")) {
printk (KERN_ERR "pm2fb: cannot reserve mmio memory, abort\n");
UNMAP(p->regions.v_fb, p->regions.fb_size);
return 0;
@@ -1047,7 +1046,7 @@
}
DPRINTK("scanning PCI bus for known chipsets...\n");
- for (dev = pci_devices; !pci->dev && dev; dev = dev->next) {
+ pci_for_each_dev(dev) {
for (i = 0; pm2pci_cards[i].vendor; i++)
if (pm2pci_cards[i].vendor == dev->vendor &&
pm2pci_cards[i].device == dev->device) {
@@ -1056,6 +1055,8 @@
DPRINTK("... found %s\n", pm2pci_cards[i].name);
break;
}
+ if (pci->dev)
+ break;
}
if (!pci->dev) {
DPRINTK("no PCI board found.\n");
@@ -2036,10 +2037,10 @@
pm2fb_reset(i);
UNMAP(i->regions.v_fb, i->regions.fb_size);
- __release_region(&iomem_resource, i->regions.p_fb, i->regions.fb_size);
+ release_mem_region(i->regions.p_fb, i->regions.fb_size);
UNMAP(i->regions.v_regs, PM2_REGS_SIZE);
- __release_region(&iomem_resource, i->regions.p_regs, PM2_REGS_SIZE);
+ release_mem_region(i->regions.p_regs, PM2_REGS_SIZE);
if (board_table[i->board].cleanup)
board_table[i->board].cleanup(i);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)