vga_pci: Fix cached resources cleanup and setup driver's softc size
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 18 Oct 2013 02:59:57 +0000 (10:59 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 18 Oct 2013 03:03:31 +0000 (11:03 +0800)
commite8be1190de880a82da339c7b763cadb8bd48e960
treea095edc87539a67af38d16bcae3eb91d8717d795
parent384438e3fac4ffcfa1a0fb610aa87d7e36677e3f
vga_pci: Fix cached resources cleanup and setup driver's softc size

- The cached resource was not cleanup even if the underlying resource was
  freed.  Now, if the cached resource reference count drops to zero, the
  underlying resource is freed and the cached resource is cleared.
Submitted-by: dillon@
- The driver uses softc, so the softc size in the driver_t needs to be
  setup properly.
sys/bus/pci/vga_pci.c