Changeset 62f4212 in mainline for uspace/drv/usbhid/kbddev.c


Ignore:
Timestamp:
2011-03-22T10:07:53Z (13 years ago)
Author:
Lubos Slovak <lubos.slovak@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f8e4cb6
Parents:
18b3cfd (diff), b01995b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merged changes from development

File:
1 edited

Legend:

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

    r18b3cfd r62f4212  
    662662        int rc;
    663663       
    664         usb_log_info("Initializing HID/KBD structure...\n");
     664        usb_log_debug("Initializing HID/KBD structure...\n");
    665665       
    666666        if (kbd_dev == NULL) {
     
    742742       
    743743        kbd_dev->initialized = USBHID_KBD_STATUS_INITIALIZED;
    744         usb_log_info("HID/KBD device structure initialized.\n");
     744        usb_log_debug("HID/KBD device structure initialized.\n");
    745745       
    746746        return EOK;
     
    769769        size_t actual_size;
    770770       
    771         usb_log_info("Polling keyboard...\n");
     771        usb_log_debug("Polling keyboard...\n");
    772772       
    773773        if (!kbd_dev->initialized) {
     
    780780
    781781        while (true) {
    782                 sess_rc = usb_endpoint_pipe_start_session(
     782                sess_rc = usb_pipe_start_session(
    783783                    &kbd_dev->hid_dev->poll_pipe);
    784784                if (sess_rc != EOK) {
     
    788788                }
    789789
    790                 rc = usb_endpoint_pipe_read(&kbd_dev->hid_dev->poll_pipe,
     790                rc = usb_pipe_read(&kbd_dev->hid_dev->poll_pipe,
    791791                    buffer, BOOTP_BUFFER_SIZE, &actual_size);
    792792               
    793                 sess_rc = usb_endpoint_pipe_end_session(
     793                sess_rc = usb_pipe_end_session(
    794794                    &kbd_dev->hid_dev->poll_pipe);
    795795
     
    907907         * Initialize device (get and process descriptors, get address, etc.)
    908908         */
    909         usb_log_info("Initializing USB/HID KBD device...\n");
     909        usb_log_debug("Initializing USB/HID KBD device...\n");
    910910       
    911911        usbhid_kbd_t *kbd_dev = usbhid_kbd_new();
     
    926926        }       
    927927       
    928         usb_log_info("USB/HID KBD device structure initialized.\n");
     928        usb_log_debug("USB/HID KBD device structure initialized.\n");
    929929       
    930930        /*
     
    937937        rc = ddf_fun_bind(kbd_fun);
    938938        if (rc != EOK) {
    939                 usb_log_error("Could not bind DDF function.\n");
     939                usb_log_error("Could not bind DDF function: %s.\n",
     940                    str_error(rc));
    940941                // TODO: Can / should I destroy the DDF function?
    941942                ddf_fun_destroy(kbd_fun);
     
    946947        rc = ddf_fun_add_to_class(kbd_fun, "keyboard");
    947948        if (rc != EOK) {
    948                 usb_log_error("Could not add DDF function to class 'keyboard'"
    949                     "\n");
     949                usb_log_error(
     950                    "Could not add DDF function to class 'keyboard': %s.\n",
     951                    str_error(rc));
    950952                // TODO: Can / should I destroy the DDF function?
    951953                ddf_fun_destroy(kbd_fun);
     
    959961        fid_t fid = fibril_create(usbhid_kbd_fibril, kbd_dev);
    960962        if (fid == 0) {
    961                 usb_log_error("Failed to start fibril for KBD device\n");
     963                usb_log_error("Failed to start fibril for `%s' device.\n",
     964                    dev->name);
    962965                return ENOMEM;
    963966        }
Note: See TracChangeset for help on using the changeset viewer.