Changeset 3e95cd7 in mainline


Ignore:
Timestamp:
2011-05-26T15:57:38Z (13 years ago)
Author:
Lubos Slovak <lubos.slovak@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
aaa3d82b
Parents:
3e6e2b9
Message:

Removed unused things from multimedia driver.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/usbhid/multimedia/multimedia.c

    r3e6e2b9 r3e95cd7  
    5959typedef struct usb_multimedia_t {
    6060        /** Previously pressed keys (not translated to key codes). */
    61         int32_t *keys_old;
     61        //int32_t *keys_old;
    6262        /** Currently pressed keys (not translated to key codes). */
    63         int32_t *keys;
     63        //int32_t *keys;
    6464        /** Count of stored keys (i.e. number of keys in the report). */
    65         size_t key_count;       
     65        //size_t key_count;     
    6666        /** IPC phone to the console device (for sending key events). */
    6767        int console_phone;
     
    175175       
    176176        // 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         }
     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//      }
    183183
    184184        free(*multim_dev);
     
    244244        multim_dev->console_phone = -1;
    245245       
    246         usb_hid_report_path_t *path = usb_hid_report_path();
    247         usb_hid_report_path_append_item(path, USB_HIDUT_PAGE_CONSUMER, 0);
    248        
    249         usb_hid_report_path_set_report_id(path, 1);
    250        
    251         multim_dev->key_count = usb_hid_report_size(
    252             hid_dev->report, 1, USB_HID_REPORT_TYPE_INPUT);
    253 
    254         usb_hid_report_path_free(path);
    255        
    256         usb_log_debug(NAME " Size of the input report: %zu\n",
    257             multim_dev->key_count);
    258        
    259         multim_dev->keys = (int32_t *)calloc(multim_dev->key_count,
    260             sizeof(int32_t));
    261        
    262         if (multim_dev->keys == NULL) {
    263                 usb_log_fatal("No memory!\n");
    264                 free(multim_dev);
    265                 return ENOMEM;
    266         }
    267        
    268         multim_dev->keys_old =
    269                 (int32_t *)calloc(multim_dev->key_count, sizeof(int32_t));
    270        
    271         if (multim_dev->keys_old == NULL) {
    272                 usb_log_fatal("No memory!\n");
    273                 free(multim_dev->keys);
    274                 free(multim_dev);
    275                 return ENOMEM;
    276         }
     246//      usb_hid_report_path_t *path = usb_hid_report_path();
     247//      usb_hid_report_path_append_item(path, USB_HIDUT_PAGE_CONSUMER, 0);
     248       
     249//      usb_hid_report_path_set_report_id(path, 1);
     250       
     251//      multim_dev->key_count = usb_hid_report_size(
     252//          hid_dev->report, 1, USB_HID_REPORT_TYPE_INPUT);
     253
     254//      usb_hid_report_path_free(path);
     255       
     256//      usb_log_debug(NAME " Size of the input report: %zu\n",
     257//          multim_dev->key_count);
     258       
     259//      multim_dev->keys = (int32_t *)calloc(multim_dev->key_count,
     260//          sizeof(int32_t));
     261       
     262//      if (multim_dev->keys == NULL) {
     263//              usb_log_fatal("No memory!\n");
     264//              free(multim_dev);
     265//              return ENOMEM;
     266//      }
     267       
     268//      multim_dev->keys_old =
     269//              (int32_t *)calloc(multim_dev->key_count, sizeof(int32_t));
     270       
     271//      if (multim_dev->keys_old == NULL) {
     272//              usb_log_fatal("No memory!\n");
     273//              free(multim_dev->keys);
     274//              free(multim_dev);
     275//              return ENOMEM;
     276//      }
    277277       
    278278        /*! @todo Autorepeat */
Note: See TracChangeset for help on using the changeset viewer.