DragonFly BSD
DragonFly commits List (threaded) for 2011-04
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

git: bus: Allow subclass to have the same name as the parent class.


From: Sepherosa Ziehau <sephe@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 7 Apr 2011 03:27:51 -0700 (PDT)

commit f4440850c0534454cce73def122ae587c15c9006
Author: Sepherosa Ziehau <sephe@dragonflybsd.org>
Date:   Thu Apr 7 18:06:03 2011 +0800

    bus: Allow subclass to have the same name as the parent class.
    
    Obtained-from: FreeBSD (Revision 154598 by jhb@freebsd.org)
    
      When loading a driver that is a subclass of another driver don't set the
      devclass's parent pointer if the two drivers share the same devclass.  This
      can happen if the drivers use the same new-bus name.  For example, we
      currently have 3 drivers that use the name "pci": the generic PCI bus
      driver, the ACPI PCI bus driver, and the OpenFirmware PCI bus driver.  If
      the ACPI PCI bus driver was defined as a subclass of the generic PCI bus
      driver, then without this check the "pci" devclass would point to itself
      as its parent and device_probe_child() would spin forever when it
      encountered the first PCI device that did have a matching driver.

Summary of changes:
 sys/kern/subr_bus.c |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/f4440850c0534454cce73def122ae587c15c9006


-- 
DragonFly BSD source repository



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]