当前位置: 首页>>代码示例>>C++>>正文


C++ OSDRV_CALLBACKS::deviceRemovedHandler方法代码示例

本文整理汇总了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"));
}
开发者ID:AvalueAES,项目名称:rev-sa01,代码行数:25,代码来源:hif.c

示例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"));
}
开发者ID:plaguedbypenguins,项目名称:atheros_sdk2,代码行数:33,代码来源:hif.c

示例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);
}
开发者ID:EddyKuo,项目名称:linux-sdk-kernel-source,代码行数:17,代码来源:hif.c

示例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;
}
开发者ID:NemProjects,项目名称:WLAN,代码行数:18,代码来源:hif.c


注:本文中的OSDRV_CALLBACKS::deviceRemovedHandler方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。