svn commit: r236184 - head/sys/dev/ata

Alexander Motin mav at FreeBSD.org
Mon May 28 14:33:16 UTC 2012


Author: mav
Date: Mon May 28 14:33:15 2012
New Revision: 236184
URL: http://svn.freebsd.org/changeset/base/236184

Log:
  Make legacy ATA to not call device_add_child() with unit number but
  without driver name. This fixed legacy ATA breakage by r235978.
  
  MFC after:	1 week

Modified:
  head/sys/dev/ata/ata-all.c

Modified: head/sys/dev/ata/ata-all.c
==============================================================================
--- head/sys/dev/ata/ata-all.c	Mon May 28 13:58:08 2012	(r236183)
+++ head/sys/dev/ata/ata-all.c	Mon May 28 14:33:15 2012	(r236184)
@@ -887,7 +887,7 @@ ata_add_child(device_t parent, struct at
 {
     device_t child;
 
-    if ((child = device_add_child(parent, NULL, unit))) {
+    if ((child = device_add_child(parent, (unit < 0) ? NULL : "ad", unit))) {
 	device_set_softc(child, atadev);
 	device_quiet(child);
 	atadev->dev = child;


More information about the svn-src-head mailing list