[Pommed-commits] r408 - trunk/pommed/mactel

jblache at alioth.debian.org jblache at alioth.debian.org
Sat Dec 1 18:38:17 UTC 2007


Author: jblache
Date: 2007-12-01 18:38:17 +0000 (Sat, 01 Dec 2007)
New Revision: 408

Modified:
   trunk/pommed/mactel/gma950_backlight.c
Log:
Map the card memory before accessing the register in gma950_backlight_probe().


Modified: trunk/pommed/mactel/gma950_backlight.c
===================================================================
--- trunk/pommed/mactel/gma950_backlight.c	2007-12-01 17:51:14 UTC (rev 407)
+++ trunk/pommed/mactel/gma950_backlight.c	2007-12-01 18:38:17 UTC (rev 408)
@@ -329,6 +329,13 @@
       return -1;
     }
 
+  ret = gma950_backlight_map();
+  if (ret < 0)
+    {
+      logmsg(LOG_ERR, "Could not map GMA950/GMA965 memory");
+      return -1;
+    }
+
   if (card == PCI_ID_PRODUCT_GMA950)
     {
       if (INREG(GMA950_REGISTER_OFFSET) & GMA950_LEGACY_MODE)
@@ -351,13 +358,6 @@
     }
 
   /* Get the maximum backlight value */
-  ret = gma950_backlight_map();
-  if (ret < 0)
-    {
-      logmsg(LOG_ERR, "Could not determine max backlight value");
-      return -1;
-    }
-
   GMA950_BACKLIGHT_MAX = gma950_backlight_get_max();
 
   /* Now, check the config and fix it if needed */




More information about the Pommed-commits mailing list