Module Name:    src
Committed By:   mrg
Date:           Mon Feb 16 12:17:57 UTC 2015

Modified Files:
        src/sys/external/bsd/drm2/radeon: radeon_pci.c

Log Message:
fix the previous.  bus_space_map() returns *zero* on success.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/external/bsd/drm2/radeon/radeon_pci.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/bsd/drm2/radeon/radeon_pci.c
diff -u src/sys/external/bsd/drm2/radeon/radeon_pci.c:1.5 src/sys/external/bsd/drm2/radeon/radeon_pci.c:1.6
--- src/sys/external/bsd/drm2/radeon/radeon_pci.c:1.5	Sat Feb 14 06:58:12 2015
+++ src/sys/external/bsd/drm2/radeon/radeon_pci.c	Mon Feb 16 12:17:57 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: radeon_pci.c,v 1.5 2015/02/14 06:58:12 mrg Exp $	*/
+/*	$NetBSD: radeon_pci.c,v 1.6 2015/02/16 12:17:57 mrg Exp $	*/
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: radeon_pci.c,v 1.5 2015/02/14 06:58:12 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: radeon_pci.c,v 1.6 2015/02/16 12:17:57 mrg Exp $");
 
 #ifdef _KERNEL_OPT
 #include "vga.h"
@@ -178,8 +178,12 @@ radeon_attach(device_t parent, device_t 
 	 * think they can.  This stops vga@isa or pcdisplay@isa
 	 * attaching, and stealing wsdisplay0.  Yuck.
 	 */
-	sc->sc_temp_set = bus_space_map(pa->pa_memt, 0xb0000, 0x10000, 0,
-					&sc->sc_temp_memh);
+	int rv = bus_space_map(pa->pa_memt, 0xb0000, 0x10000, 0,
+			       &sc->sc_temp_memh);
+	sc->sc_temp_set = rv == 0;
+	if (rv != 0)
+		aprint_error_dev(self, "unable to reserve VGA registers for "
+				       "i386 radeondrmkms hack\n");
 #endif
 
 	config_mountroot(self, &radeon_attach_real);

Reply via email to