svn commit: r236544 - stable/8/sys/dev/ata

Alexander Motin mav at FreeBSD.org
Mon Jun 4 07:08:58 UTC 2012


Author: mav
Date: Mon Jun  4 07:08:58 2012
New Revision: 236544
URL: http://svn.freebsd.org/changeset/base/236544

Log:
  MFC r236184:
  Make legacy ATA to not call device_add_child() with unit number but
  without driver name.

Modified:
  stable/8/sys/dev/ata/ata-all.c
Directory Properties:
  stable/8/sys/   (props changed)

Modified: stable/8/sys/dev/ata/ata-all.c
==============================================================================
--- stable/8/sys/dev/ata/ata-all.c	Mon Jun  4 07:07:46 2012	(r236543)
+++ stable/8/sys/dev/ata/ata-all.c	Mon Jun  4 07:08:58 2012	(r236544)
@@ -886,7 +886,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-all mailing list