From c2440fc395ed32434f59f430f179d90b551878a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Voltz?= Date: Fri, 5 Mar 2010 13:43:30 +0100 Subject: [PATCH] fix sensor detection for HP4470 --- backend/rts8891.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/backend/rts8891.c b/backend/rts8891.c index bf37abe02..4217c7c5e 100644 --- a/backend/rts8891.c +++ b/backend/rts8891.c @@ -3783,14 +3783,17 @@ init_device (struct Rts8891_Device *dev) /* initial sensor guess */ val = dev->regs[0x44] + 256 * dev->regs[0x45]; DBG (DBG_io, "init_device: R44/45=0x%04x\n", val); - if (dev->sensor == SENSOR_TYPE_4400 && val != 0x00) + if (dev->sensor == SENSOR_TYPE_4400) { - DBG (DBG_info, "init_device: SENSOR_TYPE_4400 detected\n"); - } - else - { - DBG (DBG_info, "init_device: SENSOR_TYPE_4400_BARE detected\n"); - dev->sensor = SENSOR_TYPE_4400_BARE; + if(val != 0x00) + { + DBG (DBG_info, "init_device: SENSOR_TYPE_4400 detected\n"); + } + else + { + DBG (DBG_info, "init_device: SENSOR_TYPE_4400_BARE detected\n"); + dev->sensor = SENSOR_TYPE_4400_BARE; + } } /* initial set written to scanner @@ -7829,3 +7832,5 @@ set_lamp_state (struct Rts8891_Session *session, int on) } return status; } + +/* vim: set sw=2 cino=>2se-1sn-1s{s^-1st0(0u0 smarttab expandtab: */