diff options
author | Dave Airlie <airlied@linux.ie> | 2006-08-19 16:55:00 +1000 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2006-08-28 11:27:09 +1000 |
commit | 205c573e449b38d759273f6a51eb8c1131585ece (patch) | |
tree | 84114a3cd10aa4f637b8aeeec822eaee9b7ecbb1 /linux-core/drm_ioctl.c | |
parent | b4feb2c04efdcf31d094b03ea32327a06d9dcdd2 (diff) |
remove local copies of pci domain/bus/slot/num
Diffstat (limited to 'linux-core/drm_ioctl.c')
-rw-r--r-- | linux-core/drm_ioctl.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/linux-core/drm_ioctl.c b/linux-core/drm_ioctl.c index 54024e1b..2ea6af08 100644 --- a/linux-core/drm_ioctl.c +++ b/linux-core/drm_ioctl.c @@ -125,9 +125,10 @@ int drm_setunique(struct inode *inode, struct file *filp, domain = bus >> 8; bus &= 0xff; - if ((domain != dev->pci_domain) || - (bus != dev->pci_bus) || - (slot != dev->pci_slot) || (func != dev->pci_func)) + if ((domain != drm_get_pci_domain(dev)) || + (bus != dev->pdev->bus->number) || + (slot != PCI_SLOT(dev->pdev->devfn)) || + (func != PCI_FUNC(dev->pdev->devfn))) return -EINVAL; return 0; @@ -145,7 +146,10 @@ static int drm_set_busid(drm_device_t * dev) return ENOMEM; len = snprintf(dev->unique, dev->unique_len, "pci:%04x:%02x:%02x.%d", - dev->pci_domain, dev->pci_bus, dev->pci_slot, dev->pci_func); + drm_get_pci_domain(dev), + dev->pdev->bus->number, + PCI_SLOT(dev->pdev->devfn), + PCI_FUNC(dev->pdev->devfn)); if (len > dev->unique_len) DRM_ERROR("buffer overflow"); |