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/usbhid/kbd/kbdrepeat.c

    rc5be39b r5f6e25e  
    8080                if (!usb_kbd_is_initialized(kbd)) {
    8181                        if (usb_kbd_is_ready_to_destroy(kbd)) {
    82                                 usb_kbd_free(&kbd);
    83                                 assert(kbd == NULL);
     82                                usb_kbd_destroy(kbd);
    8483                        }
    8584                        return;
Note: See TracChangeset for help on using the changeset viewer.