summaryrefslogtreecommitdiff
path: root/sys/arch/macppc/dev
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/macppc/dev')
-rw-r--r--sys/arch/macppc/dev/pgs.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/sys/arch/macppc/dev/pgs.c b/sys/arch/macppc/dev/pgs.c
index cedb1bf265c..dfec63a60f6 100644
--- a/sys/arch/macppc/dev/pgs.c
+++ b/sys/arch/macppc/dev/pgs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pgs.c,v 1.1 2010/04/09 19:24:17 jasper Exp $ */
+/* $OpenBSD: pgs.c,v 1.2 2011/02/19 22:15:11 kettenis Exp $ */
/*
* Copyright (c) 2010 Jasper Lievisse Adriaanse <jasper@openbsd.org>
*
@@ -54,11 +54,16 @@ int
pgs_match(struct device *parent, void *arg, void *aux)
{
struct confargs *ca = aux;
+ char type[32];
- if (strcmp(ca->ca_name, "programmer-switch") == 0)
- return 1;
+ if (strcmp(ca->ca_name, "programmer-switch") != 0)
+ return 0;
- return 0;
+ OF_getprop(ca->ca_node, "device_type", type, sizeof(type));
+ if (strcmp(type, "programmer-switch") != 0)
+ return 0;
+
+ return 1;
}
void