Beispiel #1
0
VOID
CSDHCBase::PreDeinit(
                     )
{
    if (m_fRegisteredWithBusDriver) {
        if (m_fDriverShutdown == FALSE) {
            // Deregister the host controller
            SDHCDDeregisterHostController(m_pHCDContext);
        }
        // else the bus driver itself already deregistered us.

        m_fRegisteredWithBusDriver = FALSE;
    }
}
Beispiel #2
0
///////////////////////////////////////////////////////////////////////////////
//  SDH_Deinit - the deinit entry point 
//  Input:  hDeviceContext - the context returned from SDH_Init
//  Output: 
//  Return: always returns TRUE
//  Notes:  
///////////////////////////////////////////////////////////////////////////////
BOOL SDH_Deinit(DWORD hDeviceContext)
{
    PSDCARD_HC_CONTEXT pHostContext;

    DbgPrintZo(SDCARD_ZONE_INIT, (TEXT("SDH: +SDH_Deinit\n")));

    pHostContext = (PSDCARD_HC_CONTEXT)hDeviceContext;

        // deregister the host controller
    SDHCDDeregisterHostController(pHostContext);

    if( pHostContext && pHostContext->pHCSpecificContext )
    {
        free( pHostContext->pHCSpecificContext );
    }

        // cleanup the context
    SDHCDDeleteContext((PSDCARD_HC_CONTEXT)hDeviceContext);

    return TRUE;
}