libaltos: remove usb id filtering from darwin code
authorKeith Packard <keithp@keithp.com>
Wed, 18 Dec 2013 20:15:54 +0000 (12:15 -0800)
committerKeith Packard <keithp@keithp.com>
Wed, 18 Dec 2013 20:15:59 +0000 (12:15 -0800)
Signed-off-by: Keith Packard <keithp@keithp.com>
libaltos/libaltos.c

index 4a6363edc7a069c4e0f83d930d24d9d7bdea4b2c..a623d5ae0b5c187f9b0c5a7bec962b1c73e2451d 100644 (file)
@@ -53,6 +53,8 @@ altos_get_last_error(struct altos_error *error)
 
 #ifdef DARWIN
 
 
 #ifdef DARWIN
 
+#include <unistd.h>
+
 #undef USE_POLL
 
 /* Mac OS X don't have strndup even if _GNU_SOURCE is defined */
 #undef USE_POLL
 
 /* Mac OS X don't have strndup even if _GNU_SOURCE is defined */
@@ -887,15 +889,6 @@ altos_list_next(struct altos_list *list, struct altos_device *device)
                if (!get_number (object, CFSTR(kUSBVendorID), &device->vendor) ||
                    !get_number (object, CFSTR(kUSBProductID), &device->product))
                        continue;
                if (!get_number (object, CFSTR(kUSBVendorID), &device->vendor) ||
                    !get_number (object, CFSTR(kUSBProductID), &device->product))
                        continue;
-               if (list->ftdi) {
-                       if (device->vendor != 0x0403)
-                               continue;
-               } else {
-                       if (device->vendor != 0xfffe)
-                               continue;
-                       if (device->product < 0x000a || 0x0013 < device->product)
-                               continue;
-               }
                if (get_string (object, CFSTR("IOCalloutDevice"), device->path, sizeof (device->path)) &&
                    get_string (object, CFSTR("USB Product Name"), device->name, sizeof (device->name)) &&
                    get_string (object, CFSTR("USB Serial Number"), serial_string, sizeof (serial_string))) {
                if (get_string (object, CFSTR("IOCalloutDevice"), device->path, sizeof (device->path)) &&
                    get_string (object, CFSTR("USB Product Name"), device->name, sizeof (device->name)) &&
                    get_string (object, CFSTR("USB Serial Number"), serial_string, sizeof (serial_string))) {