Changeset d09f3720 in mainline for uspace/drv/usbhub/usbhub.c


Ignore:
Timestamp:
2011-05-19T15:20:48Z (13 years ago)
Author:
Lubos Slovak <lubos.slovak@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4939490
Parents:
df44fa2 (diff), 7941bd6 (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:

Development changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/usbhub/usbhub.c

    rdf44fa2 rd09f3720  
    4242#include <usb/ddfiface.h>
    4343#include <usb/descriptor.h>
    44 #include <usb/recognise.h>
    45 #include <usb/request.h>
     44#include <usb/dev/recognise.h>
     45#include <usb/dev/request.h>
    4646#include <usb/classes/hub.h>
    47 #include <usb/devpoll.h>
     47#include <usb/dev/poll.h>
    4848#include <stdio.h>
    4949
     
    5151#include "usbhub_private.h"
    5252#include "port_status.h"
    53 #include "usb/usb.h"
    54 #include "usb/pipes.h"
    55 #include "usb/classes/classes.h"
     53#include <usb/usb.h>
     54#include <usb/dev/pipes.h>
     55#include <usb/classes/classes.h>
    5656
    5757
     
    7171
    7272static void usb_hub_process_global_interrupt(usb_hub_info_t * hub_info);
     73
     74static void usb_hub_polling_terminted_callback(usb_device_t * device,
     75    bool was_error, void * data);
    7376
    7477
     
    351354        rc = usb_device_auto_poll(hub_info->usb_device, 0,
    352355            hub_port_changes_callback, ((hub_info->port_count + 1) / 8) + 1,
    353             NULL, hub_info);
     356            usb_hub_polling_terminted_callback, hub_info);
    354357        if (rc != EOK) {
    355358                usb_log_error("Failed to create polling fibril: %s.\n",
     
    489492
    490493/**
     494 * callback called from hub polling fibril when the fibril terminates
     495 *
     496 * Should perform a cleanup - deletes hub_info.
     497 * @param device usb device afected
     498 * @param was_error indicates that the fibril is stoped due to an error
     499 * @param data pointer to usb_hub_info_t structure
     500 */
     501static void usb_hub_polling_terminted_callback(usb_device_t * device,
     502    bool was_error, void * data){
     503        usb_hub_info_t * hub_info = data;
     504        if(!hub_info) return;
     505        free(hub_info->ports);
     506        free(hub_info);
     507}
     508
     509
     510
     511
     512/**
    491513 * @}
    492514 */
Note: See TracChangeset for help on using the changeset viewer.