summaryrefslogtreecommitdiff
path: root/src/video_out/libdha/sysdep/pci_powerpc.c
diff options
context:
space:
mode:
authorJames Stembridge <jstembridge@users.sourceforge.net>2003-11-16 17:18:09 +0000
committerJames Stembridge <jstembridge@users.sourceforge.net>2003-11-16 17:18:09 +0000
commit4e6502e7006b2461f8523deb5f0213873f8cb5e8 (patch)
treeb3aeb01e90ea42c070d69baa1bd13cd1854b1623 /src/video_out/libdha/sysdep/pci_powerpc.c
parent589a1b197b720d08ce0b6a34ab72b65dbf43c0fa (diff)
downloadxine-lib-4e6502e7006b2461f8523deb5f0213873f8cb5e8.tar.gz
xine-lib-4e6502e7006b2461f8523deb5f0213873f8cb5e8.tar.bz2
sync with vidix cvs
CVS patchset: 5755 CVS date: 2003/11/16 17:18:09
Diffstat (limited to 'src/video_out/libdha/sysdep/pci_powerpc.c')
-rw-r--r--src/video_out/libdha/sysdep/pci_powerpc.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/src/video_out/libdha/sysdep/pci_powerpc.c b/src/video_out/libdha/sysdep/pci_powerpc.c
index b2914d551..667b4db37 100644
--- a/src/video_out/libdha/sysdep/pci_powerpc.c
+++ b/src/video_out/libdha/sysdep/pci_powerpc.c
@@ -5,7 +5,6 @@
*/
static int pci_config_type( void ) { return 1; }
-
#ifdef linux
#include <fcntl.h>
#include <sys/io.h>
@@ -139,11 +138,8 @@ static void pci_config_write_long(
val = bswap_32(val);
sprintf(path,"/proc/bus/pci/%02d/%02x.0", bus, dev);
fd = open(path,O_RDONLY|O_SYNC);
- if (fd == -1) {
- retval=0;
- }
- else pwrite(fd, &val, 4, cmd);
if (fd > 0) {
+ pwrite(fd, &val, 4, cmd);
close(fd);
}
}
@@ -160,14 +156,10 @@ static void pci_config_write_word(
val = bswap_16(val);
sprintf(path,"/proc/bus/pci/%02d/%02x.0", bus, dev);
fd = open(path,O_RDONLY|O_SYNC);
- if (fd == -1) {
- retval=0;
- }
- else pwrite(fd, &val, 2, cmd);
if (fd > 0) {
+ pwrite(fd, &val, 2, cmd);
close(fd);
}
- return retval;
}
static void pci_config_write_byte(
@@ -181,14 +173,10 @@ static void pci_config_write_byte(
int fd;
sprintf(path,"/proc/bus/pci/%02d/%02x.0", bus, dev);
fd = open(path,O_RDONLY|O_SYNC);
- if (fd == -1) {
- retval=0;
- }
- else pwrite(fd, &retval, 1, cmd);
if (fd > 0) {
+ pwrite(fd, &val, 1, cmd);
close(fd);
}
- return retval;
}
#else
static long pci_config_read_long(