本文整理汇总了C++中OSDRV_CALLBACKS::deviceRemovedHandler方法的典型用法代码示例。如果您正苦于以下问题:C++ OSDRV_CALLBACKS::deviceRemovedHandler方法的具体用法?C++ OSDRV_CALLBACKS::deviceRemovedHandler怎么用?C++ OSDRV_CALLBACKS::deviceRemovedHandler使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OSDRV_CALLBACKS
的用法示例。
在下文中一共展示了OSDRV_CALLBACKS::deviceRemovedHandler方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: hifDeviceRemoved
static void hifDeviceRemoved(struct sdio_func *func)
{
A_STATUS status = A_OK;
HIF_DEVICE *device;
AR_DEBUG_ASSERT(func != NULL);
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: +hifDeviceRemoved\n"));
device = getHifDevice(func);
if (device->claimedContext != NULL) {
status = osdrvCallbacks.deviceRemovedHandler(device->claimedContext, device);
}
if (device->is_suspend) {
device->is_suspend = FALSE;
} else {
if (hifDisableFunc(device, func)!=0) {
status = A_ERROR;
}
}
CleanupHIFScatterResources(device);
delHifDevice(device);
AR_DEBUG_ASSERT(status == A_OK);
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: -hifDeviceRemoved\n"));
}
示例2: hifDeviceRemoved
static void hifDeviceRemoved(struct sdio_func *func)
{
A_STATUS status = A_OK;
HIF_DEVICE *device;
int ret;
AR_DEBUG_ASSERT(func != NULL);
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: +hifDeviceRemoved\n"));
device = getHifDevice(func);
if (device->claimedContext != NULL) {
status = osdrvCallbacks.deviceRemovedHandler(device->claimedContext, device);
}
do {
if (device->is_suspend) {
device->is_suspend = FALSE;
break;
}
if (!IS_ERR(device->async_task)) {
init_completion(&device->async_completion);
device->async_shutdown = 1;
up(&device->sem_async);
wait_for_completion(&device->async_completion);
device->async_task = NULL;
}
/* Disable the card */
sdio_claim_host(device->func);
ret = sdio_disable_func(device->func);
sdio_release_host(device->func);
} while (0);
delHifDevice(device);
AR_DEBUG_ASSERT(status == A_OK);
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: -hifDeviceRemoved\n"));
}
示例3: hifCleanupDevice
void
hifDeviceRemoved(SDFUNCTION *function, SDDEVICE *handle)
{
A_STATUS status = A_OK;
HIF_DEVICE *device;
AR_DEBUG_ASSERT(function != NULL);
AR_DEBUG_ASSERT(handle != NULL);
/* our device is the IRQ context we stored */
device = (HIF_DEVICE *)handle->IrqContext;
if (device->claimedContext != NULL) {
status = osdrvCallbacks.deviceRemovedHandler(device->claimedContext, device);
}
/* cleanup the instance */
hifCleanupDevice(device);
AR_DEBUG_ASSERT(status == A_OK);
}
示例4: getHifDevice
void
hifDeviceRemoved(SD_DEVICE_HANDLE *handle)
{
A_STATUS status;
HIF_DEVICE *device;
NDIS_DEBUG_PRINTF(1, "%s() : + Enter \r\n", __FUNCTION__);
device = getHifDevice(handle);
if (device->claimedContext != NULL) {
status = osdrvCallbacks.deviceRemovedHandler(device->claimedContext, device);
}
delHifDevice(handle);
AR_DEBUG_ASSERT(status == A_OK);
return;
}