drm: remove the DRM pci domain
[cascardo/linux.git] / drivers / char / drm / drmP.h
index cb76e5c..4f0de97 100644 (file)
@@ -44,7 +44,6 @@
  * can build the DRM (part of PI DRI). 4/21/2000 S + B */
 #include <asm/current.h>
 #endif                         /* __alpha__ */
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/miscdevice.h>
 
 /*@}*/
 
-/***********************************************************************/
-/** \name Backward compatibility section */
-/*@{*/
-
-#define DRM_RPR_ARG(vma) vma,
-
-#define VM_OFFSET(vma) ((vma)->vm_pgoff << PAGE_SHIFT)
-
-/*@}*/
-
 /***********************************************************************/
 /** \name Macros to make printk easier */
 /*@{*/
 /*@{*/
 
 #define DRM_ARRAY_SIZE(x) ARRAY_SIZE(x)
-#define DRM_MIN(a,b) min(a,b)
-#define DRM_MAX(a,b) max(a,b)
 
 #define DRM_LEFTCOUNT(x) (((x)->rp + (x)->count - (x)->wp) % ((x)->count + 1))
 #define DRM_BUFCOUNT(x) ((x)->count - DRM_LEFTCOUNT(x))
@@ -712,10 +699,6 @@ typedef struct drm_device {
        drm_agp_head_t *agp;    /**< AGP data */
 
        struct pci_dev *pdev;           /**< PCI device structure */
-       int pci_domain;                 /**< PCI bus domain number */
-       int pci_bus;                    /**< PCI bus number */
-       int pci_slot;                   /**< PCI slot number */
-       int pci_func;                   /**< PCI function number */
 #ifdef __alpha__
        struct pci_controller *hose;
 #endif
@@ -737,6 +720,12 @@ static __inline__ int drm_core_check_feature(struct drm_device *dev,
        return ((dev->driver->driver_features & feature) ? 1 : 0);
 }
 
+#ifdef __alpha__
+#define drm_get_pci_domain(dev) dev->hose->bus->number
+#else
+#define drm_get_pci_domain(dev) pci_domain_nr(dev->pdev->bus)
+#endif
+
 #if __OS_HAS_AGP
 static inline int drm_core_has_AGP(struct drm_device *dev)
 {