aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/drmP.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2006-08-07 06:23:42 -0400
committerDave Airlie <airlied@linux.ie>2006-09-21 15:32:30 -0400
commit332296016ee2e808b362de66bf6bec49c396e5bf (patch)
tree4bf9c5794f851f1a54e8468b4da9c0531795e004 /drivers/char/drm/drmP.h
parent242ef0e1e7e5bb7e80c3620c1aa55168819d6fb8 (diff)
drm: remove the DRM pci domain
This patch removes the pci_domain from the DRM device structure, and gets it via a macro that either asks the platform or does the alpha special case. jgarzik asked for this to just use the platform magic, but I've no alpha experience and I'd rather not just break it and wait for someone to give out. Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/drm/drmP.h')
-rw-r--r--drivers/char/drm/drmP.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/char/drm/drmP.h b/drivers/char/drm/drmP.h
index 9838e8ce6ff2..4f0de974c191 100644
--- a/drivers/char/drm/drmP.h
+++ b/drivers/char/drm/drmP.h
@@ -699,7 +699,6 @@ typedef struct drm_device {
699 drm_agp_head_t *agp; /**< AGP data */ 699 drm_agp_head_t *agp; /**< AGP data */
700 700
701 struct pci_dev *pdev; /**< PCI device structure */ 701 struct pci_dev *pdev; /**< PCI device structure */
702 int pci_domain; /**< PCI bus domain number */
703#ifdef __alpha__ 702#ifdef __alpha__
704 struct pci_controller *hose; 703 struct pci_controller *hose;
705#endif 704#endif
@@ -721,6 +720,12 @@ static __inline__ int drm_core_check_feature(struct drm_device *dev,
721 return ((dev->driver->driver_features & feature) ? 1 : 0); 720 return ((dev->driver->driver_features & feature) ? 1 : 0);
722} 721}
723 722
723#ifdef __alpha__
724#define drm_get_pci_domain(dev) dev->hose->bus->number
725#else
726#define drm_get_pci_domain(dev) pci_domain_nr(dev->pdev->bus)
727#endif
728
724#if __OS_HAS_AGP 729#if __OS_HAS_AGP
725static inline int drm_core_has_AGP(struct drm_device *dev) 730static inline int drm_core_has_AGP(struct drm_device *dev)
726{ 731{