Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/sys -change the config_found() macro to use config_sound...



details:   https://anonhg.NetBSD.org/src/rev/dd1e117dd464
branches:  trunk
changeset: 569695:dd1e117dd464
user:      drochner <drochner%NetBSD.org@localhost>
date:      Mon Aug 30 09:53:32 2004 +0000

description:
-change the config_found() macro to use config_sound_sm_loc()
 internally (shouldn't make a difference for callers)
-add convenience macros for config_found() and config_search() to
 ease the case where just an interface attribute is specified

diffstat:

 sys/sys/device.h |  13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diffs (42 lines):

diff -r c6b0b854fbdd -r dd1e117dd464 sys/sys/device.h
--- a/sys/sys/device.h  Mon Aug 30 09:48:05 2004 +0000
+++ b/sys/sys/device.h  Mon Aug 30 09:53:32 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: device.h,v 1.69 2004/08/17 22:13:18 drochner Exp $ */
+/* $NetBSD: device.h,v 1.70 2004/08/30 09:53:32 drochner Exp $ */
 
 /*
  * Copyright (c) 1996, 2000 Christopher G. Demetriou
@@ -358,15 +358,22 @@
 struct cfdata *config_search(cfmatch_t, struct device *, void *);
 struct cfdata *config_search_loc(cfmatch_loc_t, struct device *,
                                 const char *, const locdesc_t *, void *);
+#define config_search_ia(sm, d, ia, a) \
+       config_search_loc((sm), (d), (ia), NULL, (a))
 struct cfdata *config_rootsearch(cfmatch_t, const char *, void *);
 struct device *config_found_sm(struct device *, void *, cfprint_t, cfmatch_t);
 struct device *config_found_sm_loc(struct device *,
                                   const char *, const locdesc_t *, void *,
                                   cfprint_t, cfmatch_loc_t);
+#define config_found_ia(d, ia, a, p) \
+       config_found_sm_loc((d), (ia), NULL, (a), (p), NULL)
+#define config_found(d, a, p) \
+       config_found_sm_loc((d), NULL, NULL, (a), (p), NULL)
 struct device *config_rootfound(const char *, void *);
 struct device *config_attach_loc(struct device *, struct cfdata *,
     const locdesc_t *, void *, cfprint_t);
-#define config_attach(p, cf, aux, pr) config_attach_loc(p, cf, 0, aux, pr)
+#define config_attach(p, cf, aux, pr) \
+       config_attach_loc((p), (cf), 0, (aux), (pr))
 int config_match(struct device *, struct cfdata *, void *);
 
 struct device *config_attach_pseudo(const char *, int);
@@ -394,7 +401,7 @@
 void   evcnt_detach(struct evcnt *);
 
 /* compatibility definitions */
-#define config_found(d, a, p)  config_found_sm((d), (a), (p), NULL)
+struct device *config_found_sm(struct device *, void *, cfprint_t, cfmatch_t);
 
 /* convenience definitions */
 #define        device_lookup(cfd, unit)                                        \



Home | Main Index | Thread Index | Old Index