Changeset 5f6e25e in mainline for uspace/drv/bus/usb/uhci/uhci.c


Ignore:
Timestamp:
2011-08-29T23:00:12Z (13 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
58cbb0c8
Parents:
c5be39b
Message:

Leave it up to DDF to free driver-specific data. This makes it possible
to ensure soft state is not freed during calls to driver entry points.

This requires some driver changes:

  • minimum change is not to free() driver-data structures (ddf_fun_t.driver_data and ddf_dev_t.driver_data)
  • ideally allocate using ddf_dev_data_alloc(), ddf_fun_data_alloc()

I tried fixing existing drivers accordingly (mostly the minimalistic
change variant), but could have missed something.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/uhci/uhci.c

    rc5be39b r5f6e25e  
    192192                ddf_fun_destroy(instance->rh_fun); \
    193193        } \
    194         free(instance); \
    195194        device->driver_data = NULL; \
    196195        usb_log_error(message); \
Note: See TracChangeset for help on using the changeset viewer.