summaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/drmP.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2006-08-07 20:23:42 +1000
committerDave Airlie <airlied@linux.ie>2006-09-22 05:32:30 +1000
commit332296016ee2e808b362de66bf6bec49c396e5bf (patch)
tree4bf9c5794f851f1a54e8468b4da9c0531795e004 /drivers/char/drm/drmP.h
parent242ef0e1e7e5bb7e80c3620c1aa55168819d6fb8 (diff)
downloadop-kernel-dev-332296016ee2e808b362de66bf6bec49c396e5bf.zip
op-kernel-dev-332296016ee2e808b362de66bf6bec49c396e5bf.tar.gz
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 9838e8c..4f0de97 100644
--- a/drivers/char/drm/drmP.h
+++ b/drivers/char/drm/drmP.h
@@ -699,7 +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 */
#ifdef __alpha__
struct pci_controller *hose;
#endif
@@ -721,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)
{
OpenPOWER on IntegriCloud