Module Name:    src
Committed By:   martin
Date:           Sun Jan 10 13:42:34 UTC 2010

Modified Files:
        src/sys/kern: subr_autoconf.c
        src/sys/rump/librump/rumpdev: rump_dev.c

Log Message:
Add a new optional function device_register_post_config(), symmetric to
device register, called after config is done with a device.
Only used if an arch defines  __HAVE_DEVICE_REGISTER_POSTCONFIG.


To generate a diff of this commit:
cvs rdiff -u -r1.195 -r1.196 src/sys/kern/subr_autoconf.c
cvs rdiff -u -r1.10 -r1.11 src/sys/rump/librump/rumpdev/rump_dev.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/subr_autoconf.c
diff -u src/sys/kern/subr_autoconf.c:1.195 src/sys/kern/subr_autoconf.c:1.196
--- src/sys/kern/subr_autoconf.c:1.195	Fri Jan  8 20:07:14 2010
+++ src/sys/kern/subr_autoconf.c	Sun Jan 10 13:42:34 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_autoconf.c,v 1.195 2010/01/08 20:07:14 dyoung Exp $ */
+/* $NetBSD: subr_autoconf.c,v 1.196 2010/01/10 13:42:34 martin Exp $ */
 
 /*
  * Copyright (c) 1996, 2000 Christopher G. Demetriou
@@ -77,7 +77,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.195 2010/01/08 20:07:14 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.196 2010/01/10 13:42:34 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -1308,6 +1308,10 @@
 		aprint_debug_dev(dev, "WARNING: power management not supported\n");
 
 	config_process_deferred(&deferred_config_queue, dev);
+
+#ifdef __HAVE_DEVICE_REGISTER_POSTCONFIG
+	device_register_post_config(dev, aux);
+#endif
 	return dev;
 }
 

Index: src/sys/rump/librump/rumpdev/rump_dev.c
diff -u src/sys/rump/librump/rumpdev/rump_dev.c:1.10 src/sys/rump/librump/rumpdev/rump_dev.c:1.11
--- src/sys/rump/librump/rumpdev/rump_dev.c:1.10	Sat Jan  9 16:32:57 2010
+++ src/sys/rump/librump/rumpdev/rump_dev.c	Sun Jan 10 13:42:34 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump_dev.c,v 1.10 2010/01/09 16:32:57 pooka Exp $	*/
+/*	$NetBSD: rump_dev.c,v 1.11 2010/01/10 13:42:34 martin Exp $	*/
 
 /*
  * Copyright (c) 2009 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rump_dev.c,v 1.10 2010/01/09 16:32:57 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump_dev.c,v 1.11 2010/01/10 13:42:34 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -92,3 +92,13 @@
 	/* nada */
 }
 #endif
+
+#ifdef __HAVE_DEVICE_REGISTER_POSTCONFIG
+void
+device_register_post_config(struct device *dev, void *v)
+{
+
+	/* nada */
+}
+#endif
+

Reply via email to