summaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/drm_ioctl.c
diff options
context:
space:
mode:
authorDave <airlied@linux.ie>2006-07-17 20:01:01 +0200
committerDave Airlie <airlied@linux.ie>2006-09-21 21:32:30 +0200
commit242ef0e1e7e5bb7e80c3620c1aa55168819d6fb8 (patch)
tree759bc571c641b90271c306ee37c6dfff7daffca3 /drivers/char/drm/drm_ioctl.c
parentdrm: cleanup old compat code and DRM fns from Linux only code (diff)
downloadlinux-242ef0e1e7e5bb7e80c3620c1aa55168819d6fb8.tar.xz
linux-242ef0e1e7e5bb7e80c3620c1aa55168819d6fb8.zip
drm: remove local copies of pci bus/slot/func
The drm keeps a local copy of these for little use. Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/drm/drm_ioctl.c')
-rw-r--r--drivers/char/drm/drm_ioctl.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/char/drm/drm_ioctl.c b/drivers/char/drm/drm_ioctl.c
index 31dfe83141ea..9f20c2b5a366 100644
--- a/drivers/char/drm/drm_ioctl.c
+++ b/drivers/char/drm/drm_ioctl.c
@@ -128,8 +128,9 @@ int drm_setunique(struct inode *inode, struct file *filp,
bus &= 0xff;
if ((domain != dev->pci_domain) ||
- (bus != dev->pci_bus) ||
- (slot != dev->pci_slot) || (func != dev->pci_func))
+ (bus != dev->pdev->bus->number) ||
+ (slot != PCI_SLOT(dev->pdev->devfn)) ||
+ (func != PCI_FUNC(dev->pdev->devfn)))
return -EINVAL;
return 0;
@@ -148,7 +149,9 @@ 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);
+ dev->pci_domain, dev->pdev->bus->number,
+ PCI_SLOT(dev->pdev->devfn),
+ PCI_FUNC(dev->pdev->devfn));
if (len > dev->unique_len)
DRM_ERROR("Unique buffer overflowed\n");