diff options
author | Kevin E Martin <kem@kem.org> | 2001-04-05 22:16:12 +0000 |
---|---|---|
committer | Kevin E Martin <kem@kem.org> | 2001-04-05 22:16:12 +0000 |
commit | 5d6ddbca26d695561fb1d08d798a0cc254b805e7 (patch) | |
tree | af1e718f29c3dfca0e577bb0f4d211c6432600e6 /linux-core/drm_ioctl.c | |
parent | a15b9dec3cfed3ce36826faf8c7d76284b0527a8 (diff) |
Merged ati-pcigart-1-0-0
Diffstat (limited to 'linux-core/drm_ioctl.c')
-rw-r--r-- | linux-core/drm_ioctl.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/linux-core/drm_ioctl.c b/linux-core/drm_ioctl.c index 2fba6b0c..1cc8f31f 100644 --- a/linux-core/drm_ioctl.c +++ b/linux-core/drm_ioctl.c @@ -95,6 +95,27 @@ int DRM(setunique)(struct inode *inode, struct file *filp, DRM_MEM_DRIVER); sprintf(dev->devname, "%s@%s", dev->name, dev->unique); +#ifdef __alpha__ + do { + struct pci_dev *pci_dev; + int b, d, f; + char *p; + + for(p = dev->unique; p && *p && *p != ':'; p++); + if (!p || !*p) break; + b = (int)simple_strtoul(p+1, &p, 10); + if (*p != ':') break; + d = (int)simple_strtoul(p+1, &p, 10); + if (*p != ':') break; + f = (int)simple_strtoul(p+1, &p, 10); + if (*p) break; + + pci_dev = pci_find_slot(b, PCI_DEVFN(d,f)); + if (pci_dev) + dev->hose = pci_dev->sysdata; + } while(0); +#endif + return 0; } |