summaryrefslogtreecommitdiff
path: root/backend/kvs40xx_cmd.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-05-24 21:03:56 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-05-24 21:03:56 +0200
commit58912f68c2489bcee787599837447e0d64dfd61a (patch)
treedda50aadde35fe152da1a8d50769987ace0f1496 /backend/kvs40xx_cmd.c
parentcfd27ef2ad8b005fd47ab41ef29b71d9e3d48201 (diff)
New upstream version 1.0.27upstream/1.0.27
Diffstat (limited to 'backend/kvs40xx_cmd.c')
-rw-r--r--backend/kvs40xx_cmd.c26
1 files changed, 2 insertions, 24 deletions
diff --git a/backend/kvs40xx_cmd.c b/backend/kvs40xx_cmd.c
index ade2014..52ccc38 100644
--- a/backend/kvs40xx_cmd.c
+++ b/backend/kvs40xx_cmd.c
@@ -360,7 +360,7 @@ kvs40xx_set_timeout (struct scanner * s, int timeout)
c.data_size = sizeof (t);
c.cmd[0] = SET_TIMEOUT;
c.cmd[2] = 0x8d;
- *((u16 *) (c.cmd + 7)) = cpu2be16 (sizeof (t));
+ copy16 (c.cmd + 7, cpu2be16 (sizeof (t)));
if (s->bus == USB)
sanei_usb_set_timeout (timeout * 1000);
@@ -379,7 +379,7 @@ kvs40xx_set_window (struct scanner * s, int wnd_id)
c.data = &wnd;
c.data_size = sizeof (wnd);
c.cmd[0] = SET_WINDOW;
- *((u16 *) (c.cmd + 7)) = cpu2be16 (sizeof (wnd));
+ copy16 (c.cmd + 7, cpu2be16 (sizeof (wnd)));
kvs40xx_init_window (s, &wnd, wnd_id);
return send_command (s, &c);
@@ -534,28 +534,6 @@ kvs40xx_read_image_data (struct scanner * s, unsigned page, unsigned side,
return status;
}
-static SANE_Status
-get_adjust_data (struct scanner * s, unsigned *dummy_length)
-{
- SANE_Status status;
- struct cmd c = {
- {0}, 10,
- NULL, 40,
- CMD_IN
- };
- u16 *data;
-
- c.cmd[0] = GET_ADJUST_DATA;
- c.cmd[2] = 0x9b;
- c.cmd[8] = 40;
- status = send_command (s, &c);
- if (status)
- return status;
- data = (u16 *) c.data;
- *dummy_length = be2cpu16 (data[0]);
- return SANE_STATUS_GOOD;
-}
-
SANE_Status
read_support_info (struct scanner * s, struct support_info * inf)
{