summaryrefslogtreecommitdiff
path: root/hw/xfree86/os-support/bus/linuxPci.c
diff options
context:
space:
mode:
authorIan Romanick <idr@us.ibm.com>2007-01-29 15:14:31 -0800
committerIan Romanick <idr@us.ibm.com>2007-01-29 15:14:31 -0800
commit3814862a869ee83d307eb01225d5949039f435d8 (patch)
tree2c84c157e19c263766a74c6528c4b1cae2948033 /hw/xfree86/os-support/bus/linuxPci.c
parenta216de9b7ff55e2b73c487d037f248f00bd2e63b (diff)
parent31f2d4a57e04f5ea635fbb50c508405c4fc37b65 (diff)
Merge branch 'master' of ssh+git://idr@git.freedesktop.org/git/xorg/xserver into pci-rework
Conflicts: hw/xfree86/os-support/bus/linuxPci.c
Diffstat (limited to 'hw/xfree86/os-support/bus/linuxPci.c')
-rw-r--r--hw/xfree86/os-support/bus/linuxPci.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/xfree86/os-support/bus/linuxPci.c b/hw/xfree86/os-support/bus/linuxPci.c
index 46ca0836e..c8f43c94d 100644
--- a/hw/xfree86/os-support/bus/linuxPci.c
+++ b/hw/xfree86/os-support/bus/linuxPci.c
@@ -401,7 +401,8 @@ linuxMapPci(int ScreenNum, int Flags, struct pci_device *dev,
/* If dev is NULL, linuxPciOpenFile will return -1, and this routine
* will fail gracefully.
*/
- if (((fd = linuxPciOpenFile(dev, FALSE)) < 0) ||
+ prot = ((Flags & VIDMEM_READONLY) == 0);
+ if (((fd = linuxPciOpenFile(Tag, prot)) < 0) ||
(ioctl(fd, mmap_ioctl, 0) < 0))
break;