From 7070fac1134aab1ab385aea2916755a92db66784 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Voltz?= Date: Mon, 4 Mar 2013 15:54:40 +0100 Subject: [PATCH] convert genesys backend to use new sanei_usb functions - call sanei_usb_scan_devices() in sane_get_devices to rescan bus to refresh USB scanner list - call sanei_usb_exit() in sane_exit to free allocated resources --- backend/genesys.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/genesys.c b/backend/genesys.c index 62e74b729..0ad19d385 100644 --- a/backend/genesys.c +++ b/backend/genesys.c @@ -6566,6 +6566,8 @@ sane_exit (void) free (devlist); devlist = 0; + sanei_usb_exit(); + DBGCOMPLETED; } @@ -6579,8 +6581,8 @@ sane_get_devices (const SANE_Device *** device_list, SANE_Bool local_only) DBG (DBG_proc, "sane_get_devices: start: local_only = %s\n", local_only == SANE_TRUE ? "true" : "false"); - /* hot-plug case :detection of newly connected scanners */ - sanei_usb_init (); + /* hot-plug case : detection of newly connected scanners */ + sanei_usb_scan_devices (); probe_genesys_devices (); if (devlist)