summaryrefslogtreecommitdiff
path: root/backend/plustek-pp_io.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2023-02-16 10:20:08 +0100
committerJörg Frings-Fürst <debian@jff.email>2023-02-16 10:20:08 +0100
commit778ebf8ee9cb22ea5727844333bcd5a6ee6bc0de (patch)
treea754e785b286ed82b45fe4e50b980714ad80e0a7 /backend/plustek-pp_io.c
parent7d8aac1f3634dc58785bec7acf097dd6bac8c394 (diff)
parent32cb765f681299af226ca0520993cbe47ba5ecd0 (diff)
Merge branch 'release/debian/1.2.1-1'debian/1.2.1-1
Diffstat (limited to 'backend/plustek-pp_io.c')
-rw-r--r--backend/plustek-pp_io.c63
1 files changed, 0 insertions, 63 deletions
diff --git a/backend/plustek-pp_io.c b/backend/plustek-pp_io.c
index af3e8c4..45ffe8b 100644
--- a/backend/plustek-pp_io.c
+++ b/backend/plustek-pp_io.c
@@ -257,21 +257,11 @@ static Bool fnEPPRead( pScanData ps, pUChar pBuffer, ULong ulSize )
if( _IS_ASIC98(ps->sCaps.AsicID)) {
-#ifndef __KERNEL__
sanei_pp_set_datadir( ps->pardev, SANEI_PP_DATAIN );
-#else
- _OUTB_CTRL( ps, (_CTRL_GENSIGNAL + _CTRL_DIRECTION));
- _DO_UDELAY( 1 );
-#endif
for( i = 0; i < ulSize; i++ )
pBuffer[i] = _INB_EPPDATA( ps );
-#ifndef __KERNEL__
sanei_pp_set_datadir( ps->pardev, SANEI_PP_DATAOUT );
-#else
- _OUTB_CTRL( ps, _CTRL_GENSIGNAL );
- _DO_UDELAY( 1 );
-#endif
} else {
for( i = 0; i < ulSize; i++ )
@@ -290,18 +280,12 @@ static Bool fnBiDirRead( pScanData ps, pUChar pBuffer, ULong ulSize )
start = _CTRL_START_BIDIREAD;
end = _CTRL_END_BIDIREAD;
-#ifndef __KERNEL__
sanei_pp_set_datadir( ps->pardev, SANEI_PP_DATAIN );
if( !sanei_pp_uses_directio()) {
start &= ~_CTRL_DIRECTION;
end &= ~_CTRL_DIRECTION;
}
-#else
- if( _IS_ASIC98(ps->sCaps.AsicID)) {
- _OUTB_CTRL( ps, (_CTRL_GENSIGNAL + _CTRL_DIRECTION));
- }
-#endif
switch( ps->IO.delay ) {
@@ -341,13 +325,7 @@ static Bool fnBiDirRead( pScanData ps, pUChar pBuffer, ULong ulSize )
}
-#ifndef __KERNEL__
sanei_pp_set_datadir( ps->pardev, SANEI_PP_DATAOUT );
-#else
- if( _IS_ASIC98(ps->sCaps.AsicID)) {
- _OUTB_CTRL( ps, _CTRL_GENSIGNAL );
- }
-#endif
return _TRUE;
}
@@ -953,45 +931,4 @@ _LOC void IOReadScannerImageData( pScanData ps, pUChar pBuf, ULong size )
ps->OpenScanPath( ps );
}
-#ifdef __KERNEL__
-
-/** the wrapper functions to support delayed and non-delayed I/O
- */
-_LOC void IOOut( Byte data, UShort port )
-{
- DBG( DBG_IOF, "outb(0x%04x, 0x%02x)\n", port, data );
- outb( data, port );
-}
-
-_LOC void IOOutDelayed( Byte data, UShort port )
-{
- DBG( DBG_IOF, "outb_p(0x%04x, 0x%02x)\n", port, data );
- outb_p( data, port );
-}
-
-_LOC Byte IOIn( UShort port )
-{
-#ifdef DEBUG
- Byte data = inb( port );
-
- DBG( DBG_IOF, "inb(0x%04x) = 0x%02x\n", port, data );
- return data;
-#else
- return inb( port );
-#endif
-}
-
-_LOC Byte IOInDelayed( UShort port )
-{
-#ifdef DEBUG
- Byte data = inb_p( port );
-
- DBG( DBG_IOF, "inb_p(0x%04x) = 0x%02x\n", port, data );
- return data;
-#else
- return inb_p( port );
-#endif
-}
-#endif /* guard __KERNEL__ */
-
/* END PLUSTEK-PP_IO.C ......................................................*/