Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/eisa Add eisa_compatible_match() and eisa_compatible...



details:   https://anonhg.NetBSD.org/src/rev/4b77ad23656b
branches:  trunk
changeset: 950388:4b77ad23656b
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Wed Jan 27 04:31:36 2021 +0000

description:
Add eisa_compatible_match() and eisa_compatible_lookup().

diffstat:

 sys/dev/eisa/eisa.c    |  22 ++++++++++++++++++++--
 sys/dev/eisa/eisavar.h |  10 +++++++++-
 2 files changed, 29 insertions(+), 3 deletions(-)

diffs (65 lines):

diff -r 9d9436afa4f1 -r 4b77ad23656b sys/dev/eisa/eisa.c
--- a/sys/dev/eisa/eisa.c       Wed Jan 27 03:17:24 2021 +0000
+++ b/sys/dev/eisa/eisa.c       Wed Jan 27 04:31:36 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: eisa.c,v 1.46 2016/07/11 11:31:50 msaitoh Exp $        */
+/*     $NetBSD: eisa.c,v 1.47 2021/01/27 04:31:36 thorpej Exp $        */
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: eisa.c,v 1.46 2016/07/11 11:31:50 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: eisa.c,v 1.47 2021/01/27 04:31:36 thorpej Exp $");
 
 #include "opt_eisaverbose.h"
 
@@ -186,6 +186,24 @@
        }
 }
 
+int
+eisa_compatible_match(const struct eisa_attach_args * const ea,
+    const struct device_compatible_entry *dce)
+{
+       const char *idstring = ea->ea_idstring;
+
+       return device_compatible_pmatch(&idstring, 1, dce);
+}
+
+const struct device_compatible_entry *
+eisa_compatible_lookup(const struct eisa_attach_args * const ea,
+    const struct device_compatible_entry *dce)
+{
+       const char *idstring = ea->ea_idstring;
+
+       return device_compatible_plookup(&idstring, 1, dce);
+}
+
 #ifdef EISAVERBOSE
 /*
  * Descriptions of of known vendors and devices ("products").
diff -r 9d9436afa4f1 -r 4b77ad23656b sys/dev/eisa/eisavar.h
--- a/sys/dev/eisa/eisavar.h    Wed Jan 27 03:17:24 2021 +0000
+++ b/sys/dev/eisa/eisavar.h    Wed Jan 27 04:31:36 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: eisavar.h,v 1.24 2008/04/28 20:23:48 martin Exp $      */
+/*     $NetBSD: eisavar.h,v 1.25 2021/01/27 04:31:36 thorpej Exp $     */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -158,4 +158,12 @@
        int ecio_shared;
 };
 
+#ifdef _KERNEL
+int    eisa_compatible_match(const struct eisa_attach_args *,
+           const struct device_compatible_entry *);
+const struct device_compatible_entry *
+       eisa_compatible_lookup(const struct eisa_attach_args *,
+           const struct device_compatible_entry *);
+#endif /* _KERNEL */
+
 #endif /* _DEV_EISA_EISAVAR_H_ */



Home | Main Index | Thread Index | Old Index