Just call a function to retrieve the pci domain, this isn't exactly
hotpath code.
Signed-off-by: Dave Airlie <airlied@xxxxxxxx>
(cherry picked from 01852d755753bbfcd5434c55d4d7375580f8338f commit)
---
drivers/char/drm/drmP.h | 10 +++++++++-
drivers/char/drm/drm_ioctl.c | 4 ++--
drivers/char/drm/drm_irq.c | 2 +-
3 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/drivers/char/drm/drmP.h b/drivers/char/drm/drmP.h
index 5c8f245..4dd28e1 100644
--- a/drivers/char/drm/drmP.h
+++ b/drivers/char/drm/drmP.h
@@ -711,7 +711,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
@@ -733,6 +732,15 @@ static __inline__ int drm_core_check_fea
+static inline int drm_get_pci_domain(struct drm_device *dev)
+{
+#ifdef __alpha__
+ return dev->hose->bus->number;
+#else
+ return 0;
+#endif
+}