Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset c8c758d in mainline


Ignore:
Timestamp:
2013-01-07T16:50:54Z (9 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master
Children:
3df8ea9
Parents:
56bd6f11
Message:

libusbdev: Create USB bus connection during initialization.

Location:
uspace/lib/usbdev
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbdev/include/usb/dev/driver.h

    r56bd6f11 rc8c758d  
    4040#include <usb/dev/usb_device_connection.h>
    4141#include <usb/dev/pipes.h>
     42#include <usb_iface.h>
    4243
    4344/** Descriptors for USB device. */
     
    109110         */
    110111        void *driver_data;
     112        usb_dev_session_t *bus_session;
    111113} usb_device_t;
    112114
  • uspace/lib/usbdev/src/devdrv.c

    r56bd6f11 rc8c758d  
    411411        usb_dev->pipes = NULL;
    412412
     413        usb_dev->bus_session = usb_dev_connect(ddf_dev);
     414        if (!usb_dev->bus_session) {
     415                *errstr_ptr = "device bus session create";
     416                return ENOMEM;
     417        }
     418
    413419        /* Get assigned params */
    414420        devman_handle_t hc_handle;
     
    497503{
    498504        if (dev) {
     505                usb_dev_session_close(dev->bus_session);
    499506                /* Destroy existing pipes. */
    500507                destroy_current_pipes(dev);
Note: See TracChangeset for help on using the changeset viewer.