Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbhost/src/endpoint.c

    r563d9d0a raa81adc  
    5353                instance->toggle = 0;
    5454                instance->active = false;
    55                 instance->destroy_hook = NULL;
    56                 instance->hc_data.data = NULL;
    57                 instance->hc_data.toggle_get = NULL;
    58                 instance->hc_data.toggle_set = NULL;
    5955                fibril_mutex_initialize(&instance->guard);
    6056                fibril_condvar_initialize(&instance->avail);
     
    6864        assert(instance);
    6965        assert(!instance->active);
    70         if (instance->hc_data.data) {
    71                 assert(instance->destroy_hook);
    72                 instance->destroy_hook(instance);
    73         }
    7466        free(instance);
    7567}
    7668/*----------------------------------------------------------------------------*/
    7769void endpoint_set_hc_data(endpoint_t *instance,
    78     void *data, void (*destroy_hook)(endpoint_t *),
    79     int (*toggle_get)(void *), void (*toggle_set)(void *, int))
     70    void *data, int (*toggle_get)(void *), void (*toggle_set)(void *, int))
    8071{
    8172        assert(instance);
    82         instance->destroy_hook = destroy_hook;
    8373        instance->hc_data.data = data;
    8474        instance->hc_data.toggle_get = toggle_get;
     
    8979{
    9080        assert(instance);
    91         instance->destroy_hook = NULL;
    9281        instance->hc_data.data = NULL;
    9382        instance->hc_data.toggle_get = NULL;
Note: See TracChangeset for help on using the changeset viewer.