Changes in uspace/drv/usbhid/multimedia/multimedia.c [19e0560e:0d59d0e9] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/usbhid/multimedia/multimedia.c
r19e0560e r0d59d0e9 143 143 assert(multim_dev != NULL); 144 144 145 // usb_multimedia_t *multim_dev = (usb_multimedia_t *)hid_dev->data; 146 145 147 console_event_t ev; 146 148 … … 171 173 // hangup phone to the console 172 174 async_hangup((*multim_dev)->console_phone); 175 176 // free all buffers 177 // if ((*multim_dev)->keys != NULL) { 178 // free((*multim_dev)->keys); 179 // } 180 // if ((*multim_dev)->keys_old != NULL) { 181 // free((*multim_dev)->keys_old); 182 // } 173 183 174 184 free(*multim_dev); … … 235 245 multim_dev->console_phone = -1; 236 246 247 // usb_hid_report_path_t *path = usb_hid_report_path(); 248 // usb_hid_report_path_append_item(path, USB_HIDUT_PAGE_CONSUMER, 0); 249 250 // usb_hid_report_path_set_report_id(path, 1); 251 252 // multim_dev->key_count = usb_hid_report_size( 253 // hid_dev->report, 1, USB_HID_REPORT_TYPE_INPUT); 254 255 // usb_hid_report_path_free(path); 256 257 // usb_log_debug(NAME " Size of the input report: %zu\n", 258 // multim_dev->key_count); 259 260 // multim_dev->keys = (int32_t *)calloc(multim_dev->key_count, 261 // sizeof(int32_t)); 262 263 // if (multim_dev->keys == NULL) { 264 // usb_log_fatal("No memory!\n"); 265 // free(multim_dev); 266 // return ENOMEM; 267 // } 268 269 // multim_dev->keys_old = 270 // (int32_t *)calloc(multim_dev->key_count, sizeof(int32_t)); 271 272 // if (multim_dev->keys_old == NULL) { 273 // usb_log_fatal("No memory!\n"); 274 // free(multim_dev->keys); 275 // free(multim_dev); 276 // return ENOMEM; 277 // } 278 237 279 /*! @todo Autorepeat */ 238 280 … … 273 315 { 274 316 // TODO: checks 275 if (hid_dev == NULL || data == NULL || buffer == NULL) {276 return false;277 }278 317 279 318 usb_log_debug(NAME " usb_lgtch_polling_callback(%p, %p, %zu)\n", 280 319 hid_dev, buffer, buffer_size); 320 321 if (data == NULL) { 322 return EINVAL; // TODO: other error code? 323 } 281 324 282 325 usb_multimedia_t *multim_dev = (usb_multimedia_t *)data; … … 305 348 | USB_HID_PATH_COMPARE_USAGE_PAGE_ONLY, 306 349 USB_HID_REPORT_TYPE_INPUT); 307 350 351 // unsigned int key; 352 308 353 /*! @todo Is this iterating OK if done multiple times? 309 354 * @todo The parsing is not OK
Note:
See TracChangeset
for help on using the changeset viewer.