Changeset c5b6db53 in mainline for uspace/drv/bus/usb/usbhid/generic/hiddev.c
- Timestamp:
- 2011-10-14T15:22:12Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f2964e45
- Parents:
- af8c9b54
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/usbhid/generic/hiddev.c
raf8c9b54 rc5b6db53 190 190 /*----------------------------------------------------------------------------*/ 191 191 192 static int usb_generic_hid_create_function(usb_hid_dev_t *hid_dev) 193 { 192 void usb_generic_hid_deinit(usb_hid_dev_t *hid_dev, void *data) 193 { 194 ddf_fun_t *fun = data; 195 const int ret = ddf_fun_unbind(fun); 196 if (ret != EOK) { 197 usb_log_error("ailed to unbind generic hid fun.\n"); 198 return; 199 } 200 ddf_fun_destroy(fun); 201 } 202 203 /*----------------------------------------------------------------------------*/ 204 205 int usb_generic_hid_init(usb_hid_dev_t *hid_dev, void **data) 206 { 207 if (hid_dev == NULL) { 208 return EINVAL; 209 } 210 194 211 /* Create the exposed function. */ 195 212 /** @todo Generate numbers for the devices? */ … … 214 231 215 232 usb_log_debug("HID function created. Handle: %" PRIun "\n", fun->handle); 216 217 return EOK; 218 } 219 220 /*----------------------------------------------------------------------------*/ 221 222 int usb_generic_hid_init(usb_hid_dev_t *hid_dev, void **data) 223 { 224 if (hid_dev == NULL) { 225 return EINVAL; 226 } 227 228 return usb_generic_hid_create_function(hid_dev); 233 *data = fun; 234 235 return EOK; 229 236 } 230 237
Note:
See TracChangeset
for help on using the changeset viewer.