More proper ifdef blocks for Linux-only bits.
This commit is contained in:
parent
810c2b7c93
commit
e37eb1be6c
4
olimex.c
4
olimex.c
|
@ -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);
|
||||||
|
|
2
rf2500.c
2
rf2500.c
|
@ -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");
|
||||||
|
|
Loading…
Reference in New Issue