From c1d93092fd883c77a31388ecc49c496da21d89f8 Mon Sep 17 00:00:00 2001 From: Justin Hibbits Date: Sun, 20 May 2012 02:43:54 +0000 Subject: [PATCH] "nvram,flash" may not be the first in the compatible list property of the nvram ofw node, so check all strings in the list. Approved by: nwhitehorn (mentor) MFC after: 3 days --- sys/dev/powermac_nvram/powermac_nvram.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/powermac_nvram/powermac_nvram.c b/sys/dev/powermac_nvram/powermac_nvram.c index 0c7949f78fad..56dc929c58f1 100644 --- a/sys/dev/powermac_nvram/powermac_nvram.c +++ b/sys/dev/powermac_nvram/powermac_nvram.c @@ -36,6 +36,7 @@ #include #include +#include #include #include @@ -118,7 +119,7 @@ powermac_nvram_probe(device_t dev) if (strcmp(type, "nvram") != 0) return ENXIO; if (strcmp(compatible, "amd-0137") != 0 && - strcmp(compatible, "nvram,flash") != 0) + !ofw_bus_is_compatible(dev, "nvram,flash")) return ENXIO; device_set_desc(dev, "Apple NVRAM");