[Pommed-commits] [SCM] pommed - hotkeys handler for Apple laptops branch, master, updated. 1.32-4-gf624899

Julien BLACHE jb at jblache.org
Wed May 12 16:53:29 UTC 2010


The following commit has been merged in the master branch:
commit f6248995107c233bd1e2e95aa23f709c66621340
Author: Julien BLACHE <jb at jblache.org>
Date:   Wed May 12 18:50:56 2010 +0200

    Kill PCI device check for nv8600mgt backlight
    
    The access method isn't actually dependent on a given PCI device; the name
    is for historic reasons.

diff --git a/ChangeLog b/ChangeLog
index 2a4bd67..7618b50 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,7 @@ version 1.33:
 	- pommed: added support for the MacBook6,1 (October 2009).
 	- pommed: added support for the MacBookPro6,1 & 6,2 (Core i5/i7,
 	April 2010).
+	- pommed: kill PCI device check in nv8600mgt.
 
 version 1.32:
 	- pommed: add the rivabl sysfs backlight driver for older 12"
diff --git a/pommed/mactel/nv8600mgt_backlight.c b/pommed/mactel/nv8600mgt_backlight.c
index d4a0edf..5530251 100644
--- a/pommed/mactel/nv8600mgt_backlight.c
+++ b/pommed/mactel/nv8600mgt_backlight.c
@@ -42,8 +42,6 @@
 
 #include <errno.h>
 
-#include <pci/pci.h>
-
 #include "../pommed.h"
 #include "../conffile.h"
 #include "../lcd_backlight.h"
@@ -177,53 +175,11 @@ nv8600mgt_backlight_toggle(int lvl)
 }
 
 
-#define PCI_ID_VENDOR_NVIDIA     0x10de
-#define PCI_ID_PRODUCT_8600MGT   0x0407
-#define PCI_ID_PRODUCT_9400M     0x0863
-#define PCI_ID_PRODUCT_9400M_G   0x0866
-#define PCI_ID_PRODUCT_9600MGT   0x0647
-
-/* Look for an nVidia GeForce 8600M GT, 9400M or 9600M GT */
 int
 nv8600mgt_backlight_probe(void)
 {
-  struct pci_access *pacc;
-  struct pci_dev *dev;
   int ret;
 
-  pacc = pci_alloc();
-  if (pacc == NULL)
-    {
-      logmsg(LOG_ERR, "Could not allocate PCI structs");
-      return -1;
-    }
-
-  pci_init(pacc);
-  pci_scan_bus(pacc);
-
-  /* Iterate over all devices */
-  for (dev = pacc->devices; dev; dev = dev->next)
-    {
-      pci_fill_info(dev, PCI_FILL_IDENT);
-      /* nVidia GeForce 8600M GT */
-      if ((dev->vendor_id == PCI_ID_VENDOR_NVIDIA)
-	  && ((dev->device_id == PCI_ID_PRODUCT_8600MGT)
-	      || (dev->device_id == PCI_ID_PRODUCT_9400M)
-	      || (dev->device_id == PCI_ID_PRODUCT_9400M_G)
-	      || (dev->device_id == PCI_ID_PRODUCT_9600MGT)))
-	{
-	  break;
-	}
-    }
-
-  pci_cleanup(pacc);
-
-  if (!dev)
-    {
-      logdebug("Failed to detect nVidia GeForce 8600M GT/9400M/9600M GT, aborting...\n");
-      return -1;
-    }
-
   /* Determine backlight I/O port */
   switch (mops->type)
     {

-- 
pommed - hotkeys handler for Apple laptops



More information about the Pommed-commits mailing list