summaryrefslogtreecommitdiff
path: root/backend/kvs40xx.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2020-02-02 17:13:42 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2020-02-02 17:13:42 +0100
commit3dade5db2a37543f19f0967901d8d80a52a1e459 (patch)
tree808b2499b54563b3290f34d70d159b1024310873 /backend/kvs40xx.c
parent5bb4cf12855ec0151de15d6c5a2354ff08766957 (diff)
parentffa8801644a7d53cc1c785e3450f794c07a14eb0 (diff)
Update upstream source from tag 'upstream/1.0.29'
Update to upstream version '1.0.29' with Debian dir 2d358af604988ebe4348e38096245d66036fe5ed
Diffstat (limited to 'backend/kvs40xx.c')
-rw-r--r--backend/kvs40xx.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/backend/kvs40xx.c b/backend/kvs40xx.c
index 6c19e55..6416d64 100644
--- a/backend/kvs40xx.c
+++ b/backend/kvs40xx.c
@@ -524,9 +524,10 @@ static SANE_Status read_image_simplex(SANE_Handle handle)
return st;
}
-static SANE_Status read_data(struct scanner *s)
+static void * read_data (void *arg)
{
- SANE_Status st;
+ struct scanner *s = (struct scanner *) arg;
+ SANE_Status st;
int duplex = s->val[DUPLEX].w;
s->read = 0;
s->side = SIDE_FRONT;
@@ -549,7 +550,7 @@ static SANE_Status read_data(struct scanner *s)
return SANE_STATUS_GOOD;
err:
s->scanning = 0;
- return st;
+ return (void *) st;
}
/* Start scanning */
@@ -640,7 +641,7 @@ sane_start (SANE_Handle handle)
goto err;
}
- if (pthread_create (&s->thread, NULL, (void *(*)(void *)) read_data, s))
+ if (pthread_create (&s->thread, NULL, read_data, s))
{
st = SANE_STATUS_IO_ERROR;
goto err;