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

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

View File

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