Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 May 2012 23:05:07 +0000 (UTC)
From:      Justin Hibbits <jhibbits@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r236368 - stable/9/sys/dev/powermac_nvram
Message-ID:  <201205312305.q4VN57ZV069270@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhibbits
Date: Thu May 31 23:05:07 2012
New Revision: 236368
URL: http://svn.freebsd.org/changeset/base/236368

Log:
  MFC r235678:
  
  "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)

Modified:
  stable/9/sys/dev/powermac_nvram/powermac_nvram.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/powermac_nvram/powermac_nvram.c
==============================================================================
--- stable/9/sys/dev/powermac_nvram/powermac_nvram.c	Thu May 31 22:54:08 2012	(r236367)
+++ stable/9/sys/dev/powermac_nvram/powermac_nvram.c	Thu May 31 23:05:07 2012	(r236368)
@@ -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");



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205312305.q4VN57ZV069270>