cvs commit: src/sys/kern bus_if.m subr_bus.c

John Baldwin jhb at FreeBSD.org
Mon Sep 11 12:41:32 PDT 2006


jhb         2006-09-11 19:41:31 UTC

  FreeBSD src repository

  Modified files:
    sys/kern             bus_if.m subr_bus.c 
  Log:
  Add a default method for BUS_ADD_CHILD() that just calls
  device_add_child_ordered().  Previously, a device driver that wanted to
  add a new child device in its identify routine had to know if the parent
  driver had a custom bus_add_child method and use BUS_ADD_CHILD() in that
  case, otherwise use device_add_child().  Getting it wrong in either
  direction would result in panics or failure to add the child device.  Now,
  BUS_ADD_CHILD() always works isolating child drivers from having to know
  intimate details about the parent driver.
  
  Discussed with: imp
  MFC after:      1 week
  
  Revision  Changes    Path
  1.32      +1 -1      src/sys/kern/bus_if.m
  1.197     +7 -0      src/sys/kern/subr_bus.c


More information about the cvs-src mailing list