aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-10-01 03:40:55 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-01 03:40:55 -0400
commit82965addad66fce61a92c5f03104ea90b0b87124 (patch)
treeb099c6ef559ea7790b84df5ce34fa54bca46e24f /drivers/char
parentf0b364a13d7fba001c0571d954f165dfaf5f434a (diff)
parent2cc1a4134f51b4aff7c7486d857e6773f493e370 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart
* master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart: [AGPGART] printk fixups. [AGPGART] Use pci_get_slot not pci_find_slot
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/agp/amd64-agp.c8
-rw-r--r--drivers/char/agp/generic.c9
2 files changed, 12 insertions, 5 deletions
diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c
index 8cd52984cda5..00b17ae39736 100644
--- a/drivers/char/agp/amd64-agp.c
+++ b/drivers/char/agp/amd64-agp.c
@@ -409,7 +409,7 @@ static int __devinit uli_agp_init(struct pci_dev *pdev)
409 int i; 409 int i;
410 unsigned size = amd64_fetch_size(); 410 unsigned size = amd64_fetch_size();
411 printk(KERN_INFO "Setting up ULi AGP.\n"); 411 printk(KERN_INFO "Setting up ULi AGP.\n");
412 dev1 = pci_find_slot ((unsigned int)pdev->bus->number,PCI_DEVFN(0,0)); 412 dev1 = pci_get_slot (pdev->bus,PCI_DEVFN(0,0));
413 if (dev1 == NULL) { 413 if (dev1 == NULL) {
414 printk(KERN_INFO PFX "Detected a ULi chipset, " 414 printk(KERN_INFO PFX "Detected a ULi chipset, "
415 "but could not fine the secondary device.\n"); 415 "but could not fine the secondary device.\n");
@@ -442,6 +442,8 @@ static int __devinit uli_agp_init(struct pci_dev *pdev)
442 enuscr= httfea+ (size * 1024 * 1024) - 1; 442 enuscr= httfea+ (size * 1024 * 1024) - 1;
443 pci_write_config_dword(dev1, ULI_X86_64_HTT_FEA_REG, httfea); 443 pci_write_config_dword(dev1, ULI_X86_64_HTT_FEA_REG, httfea);
444 pci_write_config_dword(dev1, ULI_X86_64_ENU_SCR_REG, enuscr); 444 pci_write_config_dword(dev1, ULI_X86_64_ENU_SCR_REG, enuscr);
445
446 pci_dev_put(dev1);
445 return 0; 447 return 0;
446} 448}
447 449
@@ -466,7 +468,7 @@ static int __devinit nforce3_agp_init(struct pci_dev *pdev)
466 468
467 printk(KERN_INFO PFX "Setting up Nforce3 AGP.\n"); 469 printk(KERN_INFO PFX "Setting up Nforce3 AGP.\n");
468 470
469 dev1 = pci_find_slot((unsigned int)pdev->bus->number, PCI_DEVFN(11, 0)); 471 dev1 = pci_get_slot(pdev->bus, PCI_DEVFN(11, 0));
470 if (dev1 == NULL) { 472 if (dev1 == NULL) {
471 printk(KERN_INFO PFX "agpgart: Detected an NVIDIA " 473 printk(KERN_INFO PFX "agpgart: Detected an NVIDIA "
472 "nForce3 chipset, but could not find " 474 "nForce3 chipset, but could not find "
@@ -510,6 +512,8 @@ static int __devinit nforce3_agp_init(struct pci_dev *pdev)
510 pci_write_config_dword(dev1, NVIDIA_X86_64_1_APBASE2, apbase); 512 pci_write_config_dword(dev1, NVIDIA_X86_64_1_APBASE2, apbase);
511 pci_write_config_dword(dev1, NVIDIA_X86_64_1_APLIMIT2, aplimit); 513 pci_write_config_dword(dev1, NVIDIA_X86_64_1_APLIMIT2, aplimit);
512 514
515 pci_dev_put(dev1);
516
513 return 0; 517 return 0;
514} 518}
515 519
diff --git a/drivers/char/agp/generic.c b/drivers/char/agp/generic.c
index 0dcdb363923f..c39200161688 100644
--- a/drivers/char/agp/generic.c
+++ b/drivers/char/agp/generic.c
@@ -581,18 +581,21 @@ static void agp_v3_parse_one(u32 *requested_mode, u32 *bridge_agpstat, u32 *vga_
581 * If not, we fall back to x4 mode. 581 * If not, we fall back to x4 mode.
582 */ 582 */
583 if ((*bridge_agpstat & AGPSTAT3_8X) && (*vga_agpstat & AGPSTAT3_8X)) { 583 if ((*bridge_agpstat & AGPSTAT3_8X) && (*vga_agpstat & AGPSTAT3_8X)) {
584 printk(KERN_INFO PFX "No AGP mode specified. Setting to highest mode supported by bridge & card (x8).\n"); 584 printk(KERN_INFO PFX "No AGP mode specified. Setting to highest mode "
585 "supported by bridge & card (x8).\n");
585 *bridge_agpstat &= ~(AGPSTAT3_4X | AGPSTAT3_RSVD); 586 *bridge_agpstat &= ~(AGPSTAT3_4X | AGPSTAT3_RSVD);
586 *vga_agpstat &= ~(AGPSTAT3_4X | AGPSTAT3_RSVD); 587 *vga_agpstat &= ~(AGPSTAT3_4X | AGPSTAT3_RSVD);
587 } else { 588 } else {
588 printk(KERN_INFO PFX "Fell back to AGPx4 mode because"); 589 printk(KERN_INFO PFX "Fell back to AGPx4 mode because");
589 if (!(*bridge_agpstat & AGPSTAT3_8X)) { 590 if (!(*bridge_agpstat & AGPSTAT3_8X)) {
590 printk("bridge couldn't do x8. bridge_agpstat:%x (orig=%x)\n", *bridge_agpstat, origbridge); 591 printk(KERN_INFO PFX "bridge couldn't do x8. bridge_agpstat:%x (orig=%x)\n",
592 *bridge_agpstat, origbridge);
591 *bridge_agpstat &= ~(AGPSTAT3_8X | AGPSTAT3_RSVD); 593 *bridge_agpstat &= ~(AGPSTAT3_8X | AGPSTAT3_RSVD);
592 *bridge_agpstat |= AGPSTAT3_4X; 594 *bridge_agpstat |= AGPSTAT3_4X;
593 } 595 }
594 if (!(*vga_agpstat & AGPSTAT3_8X)) { 596 if (!(*vga_agpstat & AGPSTAT3_8X)) {
595 printk("graphics card couldn't do x8. vga_agpstat:%x (orig=%x)\n", *vga_agpstat, origvga); 597 printk(KERN_INFO PFX "graphics card couldn't do x8. vga_agpstat:%x (orig=%x)\n",
598 *vga_agpstat, origvga);
596 *vga_agpstat &= ~(AGPSTAT3_8X | AGPSTAT3_RSVD); 599 *vga_agpstat &= ~(AGPSTAT3_8X | AGPSTAT3_RSVD);
597 *vga_agpstat |= AGPSTAT3_4X; 600 *vga_agpstat |= AGPSTAT3_4X;
598 } 601 }