diff options
author | jhibbits <jhibbits@FreeBSD.org> | 2012-05-20 02:43:54 +0000 |
---|---|---|
committer | jhibbits <jhibbits@FreeBSD.org> | 2012-05-20 02:43:54 +0000 |
commit | 48cd79c1b49e9103565a81cd1a26f50505fa96a4 (patch) | |
tree | ae7fa5cd0add3bb0776f3cea4fbe4287ea57c5dd /sys/dev/powermac_nvram | |
parent | 5e2b556c1957787e1224e87ab51f1d68d0b14ab4 (diff) | |
download | FreeBSD-src-48cd79c1b49e9103565a81cd1a26f50505fa96a4.zip FreeBSD-src-48cd79c1b49e9103565a81cd1a26f50505fa96a4.tar.gz |
"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
Diffstat (limited to 'sys/dev/powermac_nvram')
-rw-r--r-- | sys/dev/powermac_nvram/powermac_nvram.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/powermac_nvram/powermac_nvram.c b/sys/dev/powermac_nvram/powermac_nvram.c index 0c7949f..56dc929 100644 --- a/sys/dev/powermac_nvram/powermac_nvram.c +++ b/sys/dev/powermac_nvram/powermac_nvram.c @@ -36,6 +36,7 @@ #include <dev/ofw/openfirm.h> #include <dev/ofw/ofw_bus.h> +#include <dev/ofw/ofw_bus_subr.h> #include <machine/bus.h> #include <machine/md_var.h> @@ -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"); |