mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2024-11-23 04:17:30 +02:00
tools/lib/atrf.c: perform driver-specific operations only if using that driver
- atrf.c (atrf_usb_handle): only return the handle if using the atusb driver - atrf.c (atrf_ben_regs): only call atben_regs if using the atben driver
This commit is contained in:
parent
641567e393
commit
7be700df11
@ -31,20 +31,20 @@ struct atrf_dsc {
|
|||||||
void *atrf_usb_handle(struct atrf_dsc *dsc)
|
void *atrf_usb_handle(struct atrf_dsc *dsc)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_USB
|
#ifdef HAVE_USB
|
||||||
|
if (dsc->driver == &atusb_driver)
|
||||||
return dsc->handle;
|
return dsc->handle;
|
||||||
#else
|
|
||||||
return NULL;
|
|
||||||
#endif
|
#endif
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void *atrf_ben_regs(struct atrf_dsc *dsc)
|
void *atrf_ben_regs(struct atrf_dsc *dsc)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_BEN
|
#ifdef HAVE_BEN
|
||||||
|
if (dsc->driver == &atben_driver)
|
||||||
return atben_regs(dsc->handle);
|
return atben_regs(dsc->handle);
|
||||||
#else
|
|
||||||
return NULL;
|
|
||||||
#endif
|
#endif
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user