More proper ifdef blocks for Linux-only bits.

This commit is contained in:
Jasper Lievisse Adriaanse 2010-12-06 12:25:45 +13:00 committed by Daniel Beer
parent 810c2b7c93
commit e37eb1be6c
2 changed files with 4 additions and 4 deletions

View File

@ -61,12 +61,12 @@ struct olimex_transport {
#define CP210X_SET_BAUDDIV 0x01
#define CP210X_SET_MHS 0x07
#define TIMEOUT 1000
#define TIMEOUT 1000
static int open_interface(struct olimex_transport *tr,
struct usb_device *dev, int ino)
{
#if !(defined (__APPLE__) || defined(WIN32))
#if defined(__linux__)
int drv;
char drName[256];
#endif
@ -82,7 +82,7 @@ static int open_interface(struct olimex_transport *tr,
return -1;
}
#if !(defined(__APPLE__) || defined(WIN32))
#if defined(__linux__)
drv = usb_get_driver_np(tr->handle, tr->int_number, drName,
sizeof(drName));
printc(__FILE__" : driver %d\n", drv);

View File

@ -67,7 +67,7 @@ static int open_interface(struct rf2500_transport *tr,
return -1;
}
#if !(defined(__APPLE__) || defined(WIN32))
#if defined(__linux__)
if (usb_detach_kernel_driver_np(tr->handle, tr->int_number) < 0)
pr_error("rf2500: warning: can't "
"detach kernel driver");