From: Eric Anholt Date: Thu, 21 Sep 2006 18:19:34 +0000 (+1000) Subject: drm: add device/vendor id to drm_device_t for compat with FreeBSD drivers X-Git-Tag: v2.6.19-rc1~641^2~2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2f02cc3fb8960754a2a5df6a33f53528e0d830be;p=linux-2.6 drm: add device/vendor id to drm_device_t for compat with FreeBSD drivers Signed-off-by: Dave Airlie --- diff --git a/drivers/char/drm/drmP.h b/drivers/char/drm/drmP.h index 4363f6e50c..7690a59ace 100644 --- a/drivers/char/drm/drmP.h +++ b/drivers/char/drm/drmP.h @@ -723,6 +723,8 @@ typedef struct drm_device { drm_agp_head_t *agp; /**< AGP data */ struct pci_dev *pdev; /**< PCI device structure */ + int pci_vendor; /**< PCI vendor id */ + int pci_device; /**< PCI device id */ #ifdef __alpha__ struct pci_controller *hose; #endif diff --git a/drivers/char/drm/drm_stub.c b/drivers/char/drm/drm_stub.c index a9bb18ac3a..7b1d4e8659 100644 --- a/drivers/char/drm/drm_stub.c +++ b/drivers/char/drm/drm_stub.c @@ -65,6 +65,8 @@ static int drm_fill_in_dev(drm_device_t * dev, struct pci_dev *pdev, mutex_init(&dev->ctxlist_mutex); dev->pdev = pdev; + dev->pci_device = pdev->device; + dev->pci_vendor = pdev->vendor; #ifdef __alpha__ dev->hose = pdev->sysdata; diff --git a/drivers/char/drm/i915_dma.c b/drivers/char/drm/i915_dma.c index a7924e28a8..fb7913ff52 100644 --- a/drivers/char/drm/i915_dma.c +++ b/drivers/char/drm/i915_dma.c @@ -31,10 +31,10 @@ #include "i915_drm.h" #include "i915_drv.h" -#define IS_I965G(dev) (dev->pdev->device == 0x2972 || \ - dev->pdev->device == 0x2982 || \ - dev->pdev->device == 0x2992 || \ - dev->pdev->device == 0x29A2) +#define IS_I965G(dev) (dev->pci_device == 0x2972 || \ + dev->pci_device == 0x2982 || \ + dev->pci_device == 0x2992 || \ + dev->pci_device == 0x29A2) /* Really want an OS-independent resettable timer. Would like to have * this loop run for (eg) 3 sec, but have the timer reset every time