Add save_power calls where they belong

merge-requests/1/head
Pierre Willenbrock 2009-10-09 23:06:51 +02:00 zatwierdzone przez Stphane Voltz
rodzic aba391f159
commit 6dddc67eb9
2 zmienionych plików z 11 dodań i 2 usunięć

Wyświetl plik

@ -6460,7 +6460,17 @@ set_option_value (Genesys_Scanner * s, int option, void *val,
}
break;
case OPT_CALIBRATE:
status = genesys_scanner_calibration (s->dev);
status = s->dev->model->cmd_set->save_power (s->dev, SANE_FALSE);
if (status != SANE_STATUS_GOOD)
{
DBG (DBG_error,
"%s: failed to disable power saving mode: %s\n",
__FUNCTION__, sane_strstatus (status));
}
else
status = genesys_scanner_calibration (s->dev);
/*not critical if this fails*/
s->dev->model->cmd_set->save_power (s->dev, SANE_TRUE);
break;
case OPT_CLEAR_CALIBRATION:
/* clear calibration cache */

Wyświetl plik

@ -5852,7 +5852,6 @@ gl841_search_strip (Genesys_Device * dev, SANE_Bool forward, SANE_Bool black)
DBG (DBG_proc, "gl841_search_strip %s %s\n", black ? "black" : "white",
forward ? "forward" : "reverse");
gl841_save_power (dev, SANE_FALSE);
gl841_set_fe (dev, AFE_SET);
status = gl841_stop_action (dev);
if (status != SANE_STATUS_GOOD)