Changeset 4d3c13e in mainline


Ignore:
Timestamp:
2011-06-16T19:19:10Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9f7276d
Parents:
98dc29d
Message:

Unused code removal

Location:
uspace/drv/usbhid
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/usbhid/generic/hiddev.c

    r98dc29d r4d3c13e  
    231231/*----------------------------------------------------------------------------*/
    232232
    233 bool usb_generic_hid_polling_callback(usb_hid_dev_t *hid_dev, void *data/*,
    234     uint8_t *buffer, size_t buffer_size*/)
    235 {
    236 //      usb_log_debug2("usb_hid_polling_callback(%p, %p, %zu)\n",
    237 //          hid_dev, buffer, buffer_size);
    238 //      usb_debug_str_buffer(buffer, buffer_size, 0);
     233bool usb_generic_hid_polling_callback(usb_hid_dev_t *hid_dev, void *data)
     234{
    239235        return true;
    240236}
  • uspace/drv/usbhid/generic/hiddev.h

    r98dc29d r4d3c13e  
    5050int usb_generic_hid_init(struct usb_hid_dev *hid_dev, void **data);
    5151
    52 bool usb_generic_hid_polling_callback(struct usb_hid_dev *hid_dev, void *data/*,
    53     uint8_t *buffer, size_t buffer_size*/);
     52bool usb_generic_hid_polling_callback(struct usb_hid_dev *hid_dev, void *data);
    5453
    5554#endif // USB_HID_HIDDDEV_H_
  • uspace/drv/usbhid/kbd/kbddev.c

    r98dc29d r4d3c13e  
    434434 *     usb_hid_parse_report().
    435435 */
    436 static void usb_kbd_process_data(usb_hid_dev_t *hid_dev, usb_kbd_t *kbd_dev/*,
    437                                  uint8_t *buffer, size_t actual_size*/)
     436static void usb_kbd_process_data(usb_hid_dev_t *hid_dev, usb_kbd_t *kbd_dev)
    438437{
    439438        assert(hid_dev->report != NULL);
    440439        assert(hid_dev != NULL);
    441440        assert(kbd_dev != NULL);
    442 
    443 //      usb_log_debug("Calling usb_hid_parse_report() with "
    444 //          "buffer %s\n", usb_debug_str_buffer(buffer, actual_size, 0));
    445441       
    446442        usb_hid_report_path_t *path = usb_hid_report_path();
    447443        usb_hid_report_path_append_item(path, USB_HIDUT_PAGE_KEYBOARD, 0);
    448444
    449 //      uint8_t report_id;
    450 //      int rc = usb_hid_parse_report(hid_dev->report, buffer, actual_size,
    451 //          &report_id);
    452        
    453 //      if (rc != EOK) {
    454 //              usb_log_warning("Error in usb_hid_parse_report():"
    455 //                  "%s\n", str_error(rc));
    456 //      }
    457        
    458445        usb_hid_report_path_set_report_id (path, hid_dev->report_id);
    459446       
     
    756743/*----------------------------------------------------------------------------*/
    757744
    758 bool usb_kbd_polling_callback(usb_hid_dev_t *hid_dev, void *data/*,
    759      uint8_t *buffer, size_t buffer_size*/)
     745bool usb_kbd_polling_callback(usb_hid_dev_t *hid_dev, void *data)
    760746{
    761747        if (hid_dev == NULL/* || buffer == NULL*/ || data == NULL) {
     
    768754       
    769755        // TODO: add return value from this function
    770         usb_kbd_process_data(hid_dev, kbd_dev/*, buffer, buffer_size*/);
     756        usb_kbd_process_data(hid_dev, kbd_dev);
    771757       
    772758        return true;
     
    804790        if ((*kbd_dev)->repeat_mtx != NULL) {
    805791                //assert(!fibril_mutex_is_locked((*kbd_dev)->repeat_mtx));
     792                // FIXME - the fibril_mutex_is_locked may not cause
     793                // fibril scheduling
    806794                while (fibril_mutex_is_locked((*kbd_dev)->repeat_mtx)) {}
    807795                free((*kbd_dev)->repeat_mtx);
  • uspace/drv/usbhid/kbd/kbddev.h

    r98dc29d r4d3c13e  
    125125int usb_kbd_init(struct usb_hid_dev *hid_dev, void **data);
    126126
    127 bool usb_kbd_polling_callback(struct usb_hid_dev *hid_dev, void *data/*,
    128                               uint8_t *buffer, size_t buffer_size*/);
     127bool usb_kbd_polling_callback(struct usb_hid_dev *hid_dev, void *data);
    129128
    130129int usb_kbd_is_initialized(const usb_kbd_t *kbd_dev);
  • uspace/drv/usbhid/mouse/mousedev.c

    r98dc29d r4d3c13e  
    229229/*----------------------------------------------------------------------------*/
    230230
    231 static bool usb_mouse_process_report(usb_hid_dev_t *hid_dev,
    232                                      usb_mouse_t *mouse_dev/*, uint8_t *buffer,
    233                                      size_t buffer_size*/)
     231static bool usb_mouse_process_report(usb_hid_dev_t *hid_dev,
     232    usb_mouse_t *mouse_dev)
    234233{
    235234        assert(mouse_dev != NULL);
    236        
    237 //      usb_log_debug2("got buffer: %s.\n",
    238 //          usb_debug_str_buffer(buffer, buffer_size, 0));
    239235       
    240236        if (mouse_dev->mouse_phone < 0) {
     
    243239        }
    244240
    245         /*
    246          * parse the input report
    247          */
    248        
    249 //      usb_log_debug(NAME " Calling usb_hid_parse_report() with "
    250 //          "buffer %s\n", usb_debug_str_buffer(buffer, buffer_size, 0));
    251        
    252 //      uint8_t report_id;
    253        
    254 //      int rc = usb_hid_parse_report(hid_dev->report, buffer, buffer_size,
    255 //          &report_id);
    256        
    257 //      if (rc != EOK) {
    258 //              usb_log_warning(NAME "Error in usb_hid_parse_report(): %s\n",
    259 //                  str_error(rc));
    260 //              return true;
    261 //      }
    262        
    263241        /*
    264242         * X
     
    510488/*----------------------------------------------------------------------------*/
    511489
    512 bool usb_mouse_polling_callback(usb_hid_dev_t *hid_dev, void *data/*,
    513      uint8_t *buffer, size_t buffer_size*/)
     490bool usb_mouse_polling_callback(usb_hid_dev_t *hid_dev, void *data)
    514491{
    515492        usb_log_debug("usb_mouse_polling_callback()\n");
    516 //      usb_debug_str_buffer(buffer, buffer_size, 0);
    517493       
    518494        if (hid_dev == NULL || data == NULL) {
     
    524500        usb_mouse_t *mouse_dev = (usb_mouse_t *)data;
    525501               
    526         return usb_mouse_process_report(hid_dev, mouse_dev/*, buffer,
    527                                         buffer_size*/);
     502        return usb_mouse_process_report(hid_dev, mouse_dev);
    528503}
    529504
  • uspace/drv/usbhid/mouse/mousedev.h

    r98dc29d r4d3c13e  
    6565int usb_mouse_init(struct usb_hid_dev *hid_dev, void **data);
    6666
    67 bool usb_mouse_polling_callback(struct usb_hid_dev *hid_dev, void *data/*,
    68     uint8_t *buffer, size_t buffer_size*/);
     67bool usb_mouse_polling_callback(struct usb_hid_dev *hid_dev, void *data);
    6968
    7069void usb_mouse_deinit(struct usb_hid_dev *hid_dev, void *data);
  • uspace/drv/usbhid/multimedia/multimedia.c

    r98dc29d r4d3c13e  
    9494       
    9595        usb_multimedia_t *multim_dev = (usb_multimedia_t *)fun->driver_data;
    96         //usb_hid_dev_t *hid_dev = (usb_hid_dev_t *)fun->driver_data;
    9796       
    9897        if (multim_dev == NULL) {
     
    274273/*----------------------------------------------------------------------------*/
    275274
    276 bool usb_multimedia_polling_callback(struct usb_hid_dev *hid_dev, void *data/*,
    277     uint8_t *buffer, size_t buffer_size*/)
     275bool usb_multimedia_polling_callback(struct usb_hid_dev *hid_dev, void *data)
    278276{
    279277        // TODO: checks
    280         if (hid_dev == NULL || data == NULL/* || buffer == NULL*/) {
     278        if (hid_dev == NULL || data == NULL) {
    281279                return false;
    282280        }
    283        
    284 //      usb_log_debug(NAME " usb_lgtch_polling_callback(%p, %p, %zu)\n",
    285 //          hid_dev, buffer, buffer_size);
    286        
     281
    287282        usb_multimedia_t *multim_dev = (usb_multimedia_t *)data;
    288 
    289 //      usb_log_debug(NAME " Calling usb_hid_parse_report() with "
    290 //          "buffer %s\n", usb_debug_str_buffer(buffer, buffer_size, 0));
    291283       
    292284        usb_hid_report_path_t *path = usb_hid_report_path();
    293285        usb_hid_report_path_append_item(path, USB_HIDUT_PAGE_CONSUMER, 0);
    294286
    295 //      uint8_t report_id;
    296        
    297 //      int rc = usb_hid_parse_report(hid_dev->report, buffer, buffer_size,
    298 //          &report_id);
    299        
    300 //      if (rc != EOK) {
    301 //              usb_log_warning(NAME "Error in usb_hid_parse_report(): %s\n",
    302 //                  str_error(rc));
    303 //              return true;
    304 //      }
    305        
    306287        usb_hid_report_path_set_report_id(path, hid_dev->report_id);
    307288
  • uspace/drv/usbhid/multimedia/multimedia.h

    r98dc29d r4d3c13e  
    4747void usb_multimedia_deinit(struct usb_hid_dev *hid_dev, void *data);
    4848
    49 bool usb_multimedia_polling_callback(struct usb_hid_dev *hid_dev, void *data/*,
    50     uint8_t *buffer, size_t buffer_size*/);
     49bool usb_multimedia_polling_callback(struct usb_hid_dev *hid_dev, void *data);
    5150
    5251/*----------------------------------------------------------------------------*/
  • uspace/drv/usbhid/usbhid.c

    r98dc29d r4d3c13e  
    598598                if (hid_dev->subdrivers[i].poll != NULL
    599599                    && hid_dev->subdrivers[i].poll(hid_dev,
    600                         hid_dev->subdrivers[i].data/*, buffer, buffer_size*/)) {
     600                        hid_dev->subdrivers[i].data)) {
    601601                        cont = true;
    602602                }
Note: See TracChangeset for help on using the changeset viewer.