summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorPaul Irofti <pirofti@cvs.openbsd.org>2013-11-05 16:37:07 +0000
committerPaul Irofti <pirofti@cvs.openbsd.org>2013-11-05 16:37:07 +0000
commit1a50c74ff22d1ec4f479275bb7eb67c96408b95f (patch)
tree8775c1ccbf597e685370ffa82d37641d2840da47 /sys
parentf7deb6ec55a859390d872f7d7d40c3eab06031b8 (diff)
octrng: Add name checks during match.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/octeon/dev/octrng.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/arch/octeon/dev/octrng.c b/sys/arch/octeon/dev/octrng.c
index db410007fc5..ace70ce1be9 100644
--- a/sys/arch/octeon/dev/octrng.c
+++ b/sys/arch/octeon/dev/octrng.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: octrng.c,v 1.3 2013/11/05 16:34:45 pirofti Exp $ */
+/* $OpenBSD: octrng.c,v 1.4 2013/11/05 16:37:06 pirofti Exp $ */
/*
* Copyright (c) 2013 Paul Irofti <pirofti@openbsd.org>
*
@@ -67,10 +67,20 @@ struct cfdriver octrng_cd = {
NULL, "octrng", DV_DULL
};
+
int
octrng_match(struct device *parent, void *match, void *aux)
{
+ struct iobus_attach_args *aa = aux;
+ struct cfdata *cf = match;
+
/* XXX: check for board type */
+
+ if (aa->aa_name == NULL ||
+ strcmp(aa->aa_name, cf->cf_driver->cd_name) != 0)
+ return (0);
+
+
return (1);
}