diff options
author | Xavier Bachelot <xavier@bachelot.org> | 2011-12-09 18:02:43 +0000 |
---|---|---|
committer | Xavier Bachelot <xavier@bachelot.org> | 2011-12-09 18:02:43 +0000 |
commit | 97a4da4428ea88c3c3b56762a093d397b5f7341c (patch) | |
tree | b2e766c5100036ced8fe248f936ada5d89cdb3a3 | |
parent | 87fd6597bdc8fd9b9c168861e200e61d74350cf7 (diff) |
-rw-r--r-- | src/via_vgahw.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/via_vgahw.c b/src/via_vgahw.c index 0123f10..34ab91f 100644 --- a/src/via_vgahw.c +++ b/src/via_vgahw.c @@ -36,6 +36,11 @@ #include "via_driver.h" /* for HAVE_DEBUG */ #include "via_vgahw.h" +#if ABI_VIDEODRV_VERSION < 12 +#define PIOOFFSET hwp->PIOOffset +#else +#define PIOOFFSET 0 +#endif static CARD8 ViaVgahwIn(vgaHWPtr hwp, int address) @@ -43,7 +48,7 @@ ViaVgahwIn(vgaHWPtr hwp, int address) if (hwp->MMIOBase) return MMIO_IN8(hwp->MMIOBase, hwp->MMIOOffset + address); else - return inb(hwp->PIOOffset + address); + return inb(PIOOFFSET + address); } static void @@ -52,7 +57,7 @@ ViaVgahwOut(vgaHWPtr hwp, int address, CARD8 value) if (hwp->MMIOBase) MMIO_OUT8(hwp->MMIOBase, hwp->MMIOOffset + address, value); else - outb(hwp->PIOOffset + address, value); + outb(PIOOFFSET + address, value); } /* |