]>
Commit | Line | Data |
---|---|---|
68245cfd MM |
1 | /* |
2 | * The PCI Library -- Access to i386 I/O ports on Linux | |
3 | * | |
9007a292 | 4 | * Copyright (c) 1997--2006 Martin Mares <mj@ucw.cz> |
68245cfd MM |
5 | * |
6 | * Can be freely distributed and used under the terms of the GNU GPL. | |
7 | */ | |
8 | ||
68245cfd | 9 | #include <sys/io.h> |
68245cfd | 10 | |
68245cfd | 11 | static int |
d305d704 | 12 | intel_setup_io(struct pci_access *a UNUSED) |
68245cfd | 13 | { |
9007a292 | 14 | return (iopl(3) < 0) ? 0 : 1; |
68245cfd MM |
15 | } |
16 | ||
9007a292 | 17 | static inline int |
d305d704 | 18 | intel_cleanup_io(struct pci_access *a UNUSED) |
68245cfd | 19 | { |
9007a292 MM |
20 | iopl(3); |
21 | return -1; | |
68245cfd | 22 | } |