summaryrefslogtreecommitdiff
path: root/sys/arch/atari/dev/hdfd.c
diff options
context:
space:
mode:
authorthorpej <thorpej@NetBSD.org>2021-04-24 23:36:23 +0000
committerthorpej <thorpej@NetBSD.org>2021-04-24 23:36:23 +0000
commit3bee0c110b9ff2a9a0e2833be339e1c873af3a44 (patch)
tree82c9f34b9867882723e76eff95e5d7ca6cab69bf /sys/arch/atari/dev/hdfd.c
parente77b3a7c4b6598de68d8b78f86e7851410840595 (diff)
Merge thorpej-cfargs branch:
Simplify and make extensible the config_search() / config_found() / config_attach() interfaces: rather than having different variants for which arguments you want pass along, just have a single call that takes a variadic list of tag-value arguments. Adjust all call sites: - Simplify wherever possible; don't pass along arguments that aren't actually needed. - Don't be explicit about what interface attribute is attaching if the device only has one. (More simplification.) - Add a config_probe() function to be used in indirect configuiration situations, making is visibly easier to see when indirect config is in play, and allowing for future change in semantics. (As of now, this is just a wrapper around config_match(), but that is an implementation detail.) Remove unnecessary or redundant interface attributes where they're not needed. There are currently 5 "cfargs" defined: - CFARG_SUBMATCH (submatch function for direct config) - CFARG_SEARCH (search function for indirect config) - CFARG_IATTR (interface attribte) - CFARG_LOCATORS (locators array) - CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles) ...and a sentinel value CFARG_EOL. Add some extra sanity checking to ensure that interface attributes aren't ambiguous. Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark ports to associate those device handles with device_t instance. This will trickle trough to more places over time (need back-end for pre-OFW Sun OBP; any others?).
Diffstat (limited to 'sys/arch/atari/dev/hdfd.c')
-rw-r--r--sys/arch/atari/dev/hdfd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/atari/dev/hdfd.c b/sys/arch/atari/dev/hdfd.c
index bceeee33f57..397e1d65031 100644
--- a/sys/arch/atari/dev/hdfd.c
+++ b/sys/arch/atari/dev/hdfd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: hdfd.c,v 1.87 2021/01/03 17:42:10 thorpej Exp $ */
+/* $NetBSD: hdfd.c,v 1.88 2021/04/24 23:36:29 thorpej Exp $ */
/*-
* Copyright (c) 1996 Leo Weppelman
@@ -91,7 +91,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hdfd.c,v 1.87 2021/01/03 17:42:10 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hdfd.c,v 1.88 2021/04/24 23:36:29 thorpej Exp $");
#include "opt_ddb.h"
@@ -464,7 +464,7 @@ fdcattach(device_t parent, device_t self, void *aux)
* XXX: Choose something sensible as a default...
*/
fa.fa_deftype = &fd_types[2]; /* 1.44MB */
- (void)config_found(self, (void *)&fa, fdprint);
+ (void)config_found(self, (void *)&fa, fdprint, CFARG_EOL);
}
}