Module Name:    src
Committed By:   thorpej
Date:           Wed Jan 27 04:31:36 UTC 2021

Modified Files:
        src/sys/dev/eisa: eisa.c eisavar.h

Log Message:
Add eisa_compatible_match() and eisa_compatible_lookup().


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/dev/eisa/eisa.c
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/eisa/eisavar.h

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

Modified files:

Index: src/sys/dev/eisa/eisa.c
diff -u src/sys/dev/eisa/eisa.c:1.46 src/sys/dev/eisa/eisa.c:1.47
--- src/sys/dev/eisa/eisa.c:1.46	Mon Jul 11 11:31:50 2016
+++ src/sys/dev/eisa/eisa.c	Wed Jan 27 04:31:36 2021
@@ -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 @@ eisaattach(device_t parent, device_t sel
 	}
 }
 
+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").

Index: src/sys/dev/eisa/eisavar.h
diff -u src/sys/dev/eisa/eisavar.h:1.24 src/sys/dev/eisa/eisavar.h:1.25
--- src/sys/dev/eisa/eisavar.h:1.24	Mon Apr 28 20:23:48 2008
+++ src/sys/dev/eisa/eisavar.h	Wed Jan 27 04:31:36 2021
@@ -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 @@ struct eisa_cfg_io {
 	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_ */

Reply via email to