From 79dcfdd72df7d38357a9dc84e7b5fd15a9074a4e Mon Sep 17 00:00:00 2001 From: Julien BLACHE Date: Wed, 23 Jun 2010 18:53:26 +0200 Subject: [PATCH] Revert "avision: kill unused function" This reverts commit 1c908927ded40fb72c7902793401971631afab4a. --- backend/avision.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/backend/avision.c b/backend/avision.c index 588ce969b..7ad415d5d 100644 --- a/backend/avision.c +++ b/backend/avision.c @@ -5984,6 +5984,28 @@ media_check (Avision_Scanner* s) return status; } +static SANE_Status +flush_media (Avision_Scanner* s) +{ + Avision_Device* dev = s->hw; + SANE_Status status; + + if (s->source_mode_dim == AV_ADF_DIM && dev->inquiry_batch_scan) + { + DBG (1, "flush_media: flushing pages out of batch scanner\n"); + do { + status = media_check (s); + if (status == SANE_STATUS_GOOD) { + SANE_Status status2 = reserve_unit (s); + DBG (1, "flush_media: reserve status: %d\n", status2); + status2 = release_unit (s, 0); + DBG (1, "flush_media: release status: %d\n", status2); + } + } while (status == SANE_STATUS_GOOD); + } + return SANE_STATUS_GOOD; +} + static SANE_Status object_position (Avision_Scanner* s, uint8_t position) {