void spapr_drc_reset(sPAPRDRConnector *drc)

{

    sPAPRDRConnectorClass *drck = SPAPR_DR_CONNECTOR_GET_CLASS(drc);



    trace_spapr_drc_reset(spapr_drc_index(drc));



    g_free(drc->ccs);

    drc->ccs = NULL;



    /* immediately upon reset we can safely assume DRCs whose devices

     * are pending removal can be safely removed.

     */

    if (drc->unplug_requested) {

        spapr_drc_release(drc);

    }



    if (drc->dev) {

        /* A device present at reset is ready to go, same as coldplugged */

        drc->state = drck->ready_state;

    } else {

        drc->state = drck->empty_state;

    }

}

void spapr_drc_reset(sPAPRDRConnector *drc)

{

    sPAPRDRConnectorClass *drck = SPAPR_DR_CONNECTOR_GET_CLASS(drc);



    trace_spapr_drc_reset(spapr_drc_index(drc));



    g_free(drc->ccs);

    drc->ccs = NULL;



    





    if (drc->unplug_requested) {

        spapr_drc_release(drc);

    }



    if (drc->dev) {

        

        drc->state = drck->ready_state;

    } else {

        drc->state = drck->empty_state;

    }

}

void FUNC_0(sPAPRDRConnector *VAR_0)

{

    sPAPRDRConnectorClass *drck = SPAPR_DR_CONNECTOR_GET_CLASS(VAR_0);



    trace_spapr_drc_reset(spapr_drc_index(VAR_0));



    g_free(VAR_0->ccs);

    VAR_0->ccs = NULL;



    





    if (VAR_0->unplug_requested) {

        spapr_drc_release(VAR_0);

    }



    if (VAR_0->dev) {

        

        VAR_0->state = drck->ready_state;

    } else {

        VAR_0->state = drck->empty_state;

    }

}

void FUNC_0(sPAPRDRConnector *VAR_0)
{ sPAPRDRConnectorClass *drck = SPAPR_DR_CONNECTOR_GET_CLASS(VAR_0); trace_spapr_drc_reset(spapr_drc_index(VAR_0)); g_free(VAR_0->ccs); VAR_0->ccs = NULL; if (VAR_0->unplug_requested) { spapr_drc_release(VAR_0); } if (VAR_0->dev) { VAR_0->state = drck->ready_state; } else { VAR_0->state = drck->empty_state; } }