Changeset 065064e6 in mainline for uspace/drv/bus/usb/usbhid/generic/hiddev.c
- Timestamp:
- 2011-10-15T12:49:18Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e3f7418
- Parents:
- 7c95d6f5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/usbhid/generic/hiddev.c
r7c95d6f5 r065064e6 201 201 } 202 202 usb_log_debug2("%s unbound.\n", fun->name); 203 /* We did not allocate this, so leave this alone 204 * the device would take care of it */ 205 fun->driver_data = NULL; 203 206 ddf_fun_destroy(fun); 204 207 } … … 223 226 224 227 fun->ops = &usb_generic_hid_ops; 225 fun->driver_data = hid_dev;226 228 227 229 int rc = ddf_fun_bind(fun); … … 232 234 return rc; 233 235 } 236 /* This is nasty both device and this function have the same 237 * driver data, thus destruction would lead to double free */ 238 fun->driver_data = hid_dev; 234 239 235 240 usb_log_debug("HID function created. Handle: %" PRIun "\n", fun->handle);
Note:
See TracChangeset
for help on using the changeset viewer.