diff --git a/backend/genesys.cc b/backend/genesys.cc index e6d24aaea..f3a9e0443 100644 --- a/backend/genesys.cc +++ b/backend/genesys.cc @@ -3551,13 +3551,7 @@ genesys_start_scan (Genesys_Device * dev, SANE_Bool lamp_off) if ((dev->model->flags & GENESYS_FLAG_SEARCH_START) && (dev->model->y_offset_calib == 0)) { - status = dev->model->cmd_set->search_start_position (dev); - if (status != SANE_STATUS_GOOD) - { - DBG(DBG_error, "%s: failed to search start position: %s\n", __func__, - sane_strstatus(status)); - return status; - } + dev->model->cmd_set->search_start_position (dev); dev->parking = SANE_FALSE; dev->model->cmd_set->slow_back_home (dev, SANE_TRUE); diff --git a/backend/genesys_gl124.cc b/backend/genesys_gl124.cc index 1d7bea21f..58ea20893 100644 --- a/backend/genesys_gl124.cc +++ b/backend/genesys_gl124.cc @@ -1916,10 +1916,9 @@ static void gl124_feed(Genesys_Device* dev, unsigned int steps, int reverse) } -/* Automatically set top-left edge of the scan area by scanning a 200x200 pixels - area at 600 dpi from very top of scanner */ -static SANE_Status -gl124_search_start_position (Genesys_Device * dev) +// Automatically set top-left edge of the scan area by scanning a 200x200 pixels area at 600 dpi +// from very top of scanner +static void gl124_search_start_position(Genesys_Device* dev) { DBG_HELPER(dbg); int size; @@ -1984,8 +1983,6 @@ gl124_search_start_position (Genesys_Device * dev) sanei_genesys_search_reference_point(dev, sensor, data.data(), 0, dpi, pixels, dev->model->search_lines); - - return SANE_STATUS_GOOD; } // sets up register for coarse gain calibration diff --git a/backend/genesys_gl646.cc b/backend/genesys_gl646.cc index 9155d21c1..140802e5b 100644 --- a/backend/genesys_gl646.cc +++ b/backend/genesys_gl646.cc @@ -2147,11 +2147,9 @@ static void gl646_slow_back_home(Genesys_Device* dev, SANE_Bool wait_until_home) * @param dev device stucture describing the scanner * @return SANE_STATUS_GOOD in cas of success, else failure code */ -static SANE_Status -gl646_search_start_position (Genesys_Device * dev) +static void gl646_search_start_position(Genesys_Device* dev) { DBG_HELPER(dbg); - SANE_Status status = SANE_STATUS_GOOD; Genesys_Settings settings; unsigned int resolution, x, y; @@ -2208,8 +2206,6 @@ gl646_search_start_position (Genesys_Device * dev) // now search reference points on the data sanei_genesys_search_reference_point(dev, sensor, data.data(), sensor.CCD_start_xoffset, resolution, settings.pixels, settings.lines); - - return status; } /** diff --git a/backend/genesys_gl841.cc b/backend/genesys_gl841.cc index 371307761..ac8b4f728 100644 --- a/backend/genesys_gl841.cc +++ b/backend/genesys_gl841.cc @@ -2975,10 +2975,9 @@ static void gl841_slow_back_home(Genesys_Device* dev, SANE_Bool wait_until_home) DBG(DBG_info, "%s: scanhead is still moving\n", __func__); } -/* Automatically set top-left edge of the scan area by scanning a 200x200 pixels - area at 600 dpi from very top of scanner */ -static SANE_Status -gl841_search_start_position (Genesys_Device * dev) +// Automatically set top-left edge of the scan area by scanning a 200x200 pixels area at 600 dpi +// from very top of scanner +static void gl841_search_start_position(Genesys_Device* dev) { DBG_HELPER(dbg); int size; @@ -3047,8 +3046,6 @@ gl841_search_start_position (Genesys_Device * dev) // and use that correctly sanei_genesys_search_reference_point(dev, sensor, data.data(), 0, dpi, pixels, dev->model->search_lines); - - return SANE_STATUS_GOOD; } // sets up register for coarse gain calibration diff --git a/backend/genesys_gl843.cc b/backend/genesys_gl843.cc index b7a4a2fbe..e9450e02b 100644 --- a/backend/genesys_gl843.cc +++ b/backend/genesys_gl843.cc @@ -2373,10 +2373,9 @@ static void gl843_slow_back_home(Genesys_Device* dev, SANE_Bool wait_until_home) DBG(DBG_info, "%s: scanhead is still moving\n", __func__); } -/* Automatically set top-left edge of the scan area by scanning a 200x200 pixels - area at 600 dpi from very top of scanner */ -static SANE_Status -gl843_search_start_position (Genesys_Device * dev) +// Automatically set top-left edge of the scan area by scanning a 200x200 pixels area at 600 dpi +// from very top of scanner +static void gl843_search_start_position(Genesys_Device* dev) { DBG_HELPER(dbg); int size; @@ -2446,8 +2445,6 @@ gl843_search_start_position (Genesys_Device * dev) sanei_genesys_search_reference_point(dev, sensor, data.data(), 0, dpi, pixels, dev->model->search_lines); - - return SANE_STATUS_GOOD; } // sets up register for coarse gain calibration diff --git a/backend/genesys_gl846.cc b/backend/genesys_gl846.cc index 9b08a0473..a803e83b7 100644 --- a/backend/genesys_gl846.cc +++ b/backend/genesys_gl846.cc @@ -1578,10 +1578,9 @@ static void gl846_slow_back_home(Genesys_Device* dev, SANE_Bool wait_until_home DBG(DBG_info, "%s: scanhead is still moving\n", __func__); } -/* Automatically set top-left edge of the scan area by scanning a 200x200 pixels - area at 600 dpi from very top of scanner */ -static SANE_Status -gl846_search_start_position (Genesys_Device * dev) +// Automatically set top-left edge of the scan area by scanning a 200x200 pixels area at 600 dpi +// from very top of scanner +static void gl846_search_start_position(Genesys_Device* dev) { DBG_HELPER(dbg); int size; @@ -1649,8 +1648,6 @@ gl846_search_start_position (Genesys_Device * dev) // and use that correctly sanei_genesys_search_reference_point(dev, sensor, data.data(), 0, dpi, pixels, dev->model->search_lines); - - return SANE_STATUS_GOOD; } // sets up register for coarse gain calibration diff --git a/backend/genesys_gl847.cc b/backend/genesys_gl847.cc index b5620ceca..b6301cf43 100644 --- a/backend/genesys_gl847.cc +++ b/backend/genesys_gl847.cc @@ -1639,10 +1639,9 @@ static void gl847_slow_back_home(Genesys_Device* dev, SANE_Bool wait_until_home) DBG(DBG_info, "%s: scanhead is still moving\n", __func__); } -/* Automatically set top-left edge of the scan area by scanning a 200x200 pixels - area at 600 dpi from very top of scanner */ -static SANE_Status -gl847_search_start_position (Genesys_Device * dev) +// Automatically set top-left edge of the scan area by scanning a 200x200 pixels area at 600 dpi +// from very top of scanner +static void gl847_search_start_position(Genesys_Device* dev) { DBG_HELPER(dbg); int size; @@ -1710,8 +1709,6 @@ gl847_search_start_position (Genesys_Device * dev) // and use that correctly sanei_genesys_search_reference_point(dev, sensor, data.data(), 0, dpi, pixels, dev->model->search_lines); - - return SANE_STATUS_GOOD; } // sets up register for coarse gain calibration diff --git a/backend/genesys_low.h b/backend/genesys_low.h index 8a5203951..947261192 100644 --- a/backend/genesys_low.h +++ b/backend/genesys_low.h @@ -1075,7 +1075,7 @@ struct Genesys_Command_Set */ void (*send_gamma_table) (Genesys_Device* dev, const Genesys_Sensor& sensor); - SANE_Status (*search_start_position) (Genesys_Device * dev); + void (*search_start_position) (Genesys_Device* dev); SANE_Status (*offset_calibration) (Genesys_Device * dev, const Genesys_Sensor& sensor, Genesys_Register_Set& regs); SANE_Status (*coarse_gain_calibration) (Genesys_Device * dev,