From 14a6dcb63e9d56dfaf22eb57ac7b8cbf3284d0c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Wed, 2 Mar 2011 12:54:10 +0100 Subject: upgrade search_devices --- libk8055/libk8055.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/libk8055/libk8055.c b/libk8055/libk8055.c index 40047d7..00aab65 100644 --- a/libk8055/libk8055.c +++ b/libk8055/libk8055.c @@ -288,11 +288,7 @@ int k8055_search_devices( void ) { for ( ssize_t i=0; idescriptor.idProduct == K8055_IPID + 0 ) ret |= 0x01; - if( usb_dev->descriptor.idProduct == K8055_IPID + 1 ) ret |= 0x02; - if( usb_dev->descriptor.idProduct == K8055_IPID + 2 ) ret |= 0x04; - if( usb_dev->descriptor.idProduct == K8055_IPID + 3 ) ret |= 0x08; - /* else some other kind of Velleman board */ + ret |= 0x01 << ( usb_descr.idProduct-K8055_IPID ); } } else { if( debug ) fprintf( stderr, "USB device descriptor unaccessible.\n" ); -- cgit v1.1-2-g2b99