Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'pci/yinghai-misc' into next

+19 -13
+1 -2
arch/ia64/pci/pci.c
··· 295 295 window->resource.flags = flags; 296 296 window->resource.start = addr.minimum + offset; 297 297 window->resource.end = window->resource.start + addr.address_length - 1; 298 - window->resource.child = NULL; 299 298 window->offset = offset; 300 299 301 300 if (insert_resource(root, &window->resource)) { ··· 356 357 &windows); 357 358 if (windows) { 358 359 controller->window = 359 - kmalloc_node(sizeof(*controller->window) * windows, 360 + kzalloc_node(sizeof(*controller->window) * windows, 360 361 GFP_KERNEL, controller->node); 361 362 if (!controller->window) 362 363 goto out2;
+1 -2
arch/x86/pci/acpi.c
··· 305 305 res->flags = flags; 306 306 res->start = start; 307 307 res->end = end; 308 - res->child = NULL; 309 308 310 309 if (!pci_use_crs) { 311 310 dev_printk(KERN_DEBUG, &info->bridge->dev, ··· 433 434 434 435 size = sizeof(*info->res) * info->res_num; 435 436 info->res_num = 0; 436 - info->res = kmalloc(size, GFP_KERNEL); 437 + info->res = kzalloc(size, GFP_KERNEL); 437 438 if (!info->res) 438 439 return; 439 440
+8 -6
drivers/gpu/vga/vgaarb.c
··· 141 141 142 142 void vga_set_default_device(struct pci_dev *pdev) 143 143 { 144 - vga_default = pdev; 144 + if (vga_default == pdev) 145 + return; 146 + 147 + pci_dev_put(vga_default); 148 + vga_default = pci_dev_get(pdev); 145 149 } 146 150 #endif 147 151 ··· 581 577 #ifndef __ARCH_HAS_VGA_DEFAULT_DEVICE 582 578 if (vga_default == NULL && 583 579 ((vgadev->owns & VGA_RSRC_LEGACY_MASK) == VGA_RSRC_LEGACY_MASK)) 584 - vga_default = pci_dev_get(pdev); 580 + vga_set_default_device(pdev); 585 581 #endif 586 582 587 583 vga_arbiter_check_bridge_sharing(vgadev); ··· 617 613 } 618 614 619 615 #ifndef __ARCH_HAS_VGA_DEFAULT_DEVICE 620 - if (vga_default == pdev) { 621 - pci_dev_put(vga_default); 622 - vga_default = NULL; 623 - } 616 + if (vga_default == pdev) 617 + vga_set_default_device(NULL); 624 618 #endif 625 619 626 620 if (vgadev->decodes & (VGA_RSRC_LEGACY_IO | VGA_RSRC_LEGACY_MEM))
+5 -1
drivers/pci/bus.c
··· 87 87 void pci_bus_remove_resources(struct pci_bus *bus) 88 88 { 89 89 int i; 90 + struct pci_bus_resource *bus_res, *tmp; 90 91 91 92 for (i = 0; i < PCI_BRIDGE_RESOURCE_NUM; i++) 92 93 bus->resource[i] = NULL; 93 94 94 - pci_free_resource_list(&bus->resources); 95 + list_for_each_entry_safe(bus_res, tmp, &bus->resources, list) { 96 + list_del(&bus_res->list); 97 + kfree(bus_res); 98 + } 95 99 } 96 100 97 101 /**
+4 -2
drivers/pci/probe.c
··· 729 729 730 730 /* Check if setup is sensible at all */ 731 731 if (!pass && 732 - (primary != bus->number || secondary <= bus->number)) { 733 - dev_dbg(&dev->dev, "bus configuration invalid, reconfiguring\n"); 732 + (primary != bus->number || secondary <= bus->number || 733 + secondary > subordinate)) { 734 + dev_info(&dev->dev, "bridge configuration invalid ([bus %02x-%02x]), reconfiguring\n", 735 + secondary, subordinate); 734 736 broken = 1; 735 737 } 736 738