Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ata Call config_cfattach_attach() regardless of whet...
details: https://anonhg.NetBSD.org/src/rev/8a39c2df12ff
branches: trunk
changeset: 320073:8a39c2df12ff
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Fri Jun 22 09:06:04 2018 +0000
description:
Call config_cfattach_attach() regardless of whether the module is
being built as part of a kernel or as a external module.
Addresses kern/53389 - thanks for the report!
XXX pullup-8
diffstat:
sys/dev/ata/ata_raid.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diffs (49 lines):
diff -r fe7a1fdbfb2f -r 8a39c2df12ff sys/dev/ata/ata_raid.c
--- a/sys/dev/ata/ata_raid.c Fri Jun 22 06:22:37 2018 +0000
+++ b/sys/dev/ata/ata_raid.c Fri Jun 22 09:06:04 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ata_raid.c,v 1.39 2016/09/27 08:05:34 pgoyette Exp $ */
+/* $NetBSD: ata_raid.c,v 1.40 2018/06/22 09:06:04 pgoyette Exp $ */
/*
* Copyright (c) 2003 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ata_raid.c,v 1.39 2016/09/27 08:05:34 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ata_raid.c,v 1.40 2018/06/22 09:06:04 pgoyette Exp $");
#include <sys/param.h>
#include <sys/buf.h>
@@ -338,26 +338,27 @@
error = config_cfdriver_attach(&ataraid_cd);
if (error)
break;
+#endif
error = config_cfattach_attach(ataraid_cd.cd_name, &ataraid_ca);
if (error) {
+#ifdef _MODULE
config_cfdriver_detach(&ataraid_cd);
+#endif
aprint_error("%s: unable to register cfattach for \n"
"%s, error %d", __func__, ataraid_cd.cd_name,
error);
break;
}
-#endif
break;
case MODULE_CMD_FINI:
-#ifdef _MODULE
-
error = config_cfattach_detach(ataraid_cd.cd_name, &ataraid_ca);
if (error) {
aprint_error("%s: failed to detach %s cfattach, "
"error %d\n", __func__, ataraid_cd.cd_name, error);
break;
}
+#ifdef _MODULE
error = config_cfdriver_detach(&ataraid_cd);
if (error) {
(void)config_cfattach_attach(ataraid_cd.cd_name,
Home |
Main Index |
Thread Index |
Old Index