ricoh2: Rearrange init/deinit code of ricoh2 to correctly support "code flow"
The backend worked incorrectly when scanning process was interrupted before the current page was scanned completely. For example, scanimage tool could not scan the next page if the previous one was interrupted. Now this issue is fixed. See also "4.4. Code Flow" in SANE API specification v.1.06. Also debug levels was changed to have better control over what should be logged.
Showing with 101 additions and 85 deletions