Re: [PATCH] PCI: fix default vga ref_count

2012-09-18 Thread Matthew Garrett
On Tue, Sep 18, 2012 at 04:44:42PM -0700, Yinghai Lu wrote: > void vga_set_default_device(struct pci_dev *pdev) > { > + if (vga_default) > + pci_dev_put(vga_default); > + > + if (pdev) > + pdev = pci_dev_get(pdev); > + > vga_default = pdev; It shouldn't hap

[PATCH] PCI: fix default vga ref_count

2012-09-18 Thread Yinghai Lu
when __ARCH_HAS_VGA_DEFAULT_DEVICE is not defined, aka EFIFB is not used, for static path, vga_default setting is through vga_arbiter_add_pci_device. and later x86 pci_fixup_video, will skip setting again. - subsys_initcall(vga_arb_device_init) come first to call vga_arbiter_add_pci_device. It wil