13int callUsbDriverFunc(
int (*func)(
int devId),
int devId,
void *gpSeg)
35 for ( curDevice = tree->m_childListStart; curDevice; curDevice = curDevice->m_next )
37 if ( curDevice->m_deviceStatus == DEVICE_READY )
39 if ( curDevice->m_devDriver )
41 if ( curDevice->m_childListStart )
42 probeDeviceTree(curDevice, drv);
46 curDevice->m_privDataField = NULL;
47 if ( callUsbDriverFunc(drv->probe, curDevice->m_id, drv->gp) )
49 curDevice->m_devDriver = drv;
50 callUsbDriverFunc(drv->connect, curDevice->m_id, drv->gp);
59 if ( drv->next || drv->prev || !drv->
name || drv->reserved1 || drv->reserved2 )
63 if ( drvListStart == drv )
68 drv->prev = drvListEnd;
70 drvListEnd->next = drv;
77 probeDeviceTree(getDeviceTreeRoot(), drv);
84 if ( drv->next || drv->prev || !drv->
name || drv->reserved1 || drv->reserved2 )
96 probeDeviceTree(getDeviceTreeRoot(), drv);
107 if ( drv == tree->m_devDriver )
109 if ( tree->m_endpointListStart )
111 ep = tree->m_endpointListStart->m_next;
112 for ( nextEp = ep; nextEp; ep = nextEp )
115 removeEndpointFromDevice(tree, ep);
118 tree->m_devDriver = NULL;
119 tree->m_privDataField = NULL;
121 for ( tree_tmp1 = tree->m_childListStart; tree_tmp1; tree_tmp1 = tree_tmp1->m_next )
123 disconnectDriver(tree_tmp1, drv);
131 for ( pos = drvListStart; pos && pos != drv; pos = pos->next )
137 drv->next->prev = drv->prev;
139 drvListEnd = drv->prev;
141 drv->prev->next = drv->next;
143 drvListStart = drv->next;
144 disconnectDriver(getDeviceTreeRoot(), drv);
148int doUnregisterAutoLoader(
void)
150 drvAutoLoader = NULL;