Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbdev/src/devdrv.c

    r58563585 r086f8e3  
    2727 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2828 */
    29 
    3029/** @addtogroup libusbdev
    3130 * @{
     
    5655        /** Connection to device on USB bus */
    5756        usb_dev_session_t *bus_session;
    58        
    5957        /** devman handle */
    6058        devman_handle_t handle;
    61        
    6259        /** The default control pipe. */
    6360        usb_pipe_t ctrl_pipe;
    64        
     61
    6562        /** Other endpoint pipes.
    66          *
    6763         * This is an array of other endpoint pipes in the same order as
    6864         * in usb_driver_t.
    6965         */
    7066        usb_endpoint_mapping_t *pipes;
    71        
    7267        /** Number of other endpoint pipes. */
    7368        size_t pipes_count;
    74        
    7569        /** Current interface.
    76          *
    7770         * Usually, drivers operate on single interface only.
    7871         * This item contains the value of the interface or -1 for any.
    7972         */
    8073        int interface_no;
    81        
    8274        /** Alternative interfaces. */
    8375        usb_alternate_interfaces_t alternate_interfaces;
    84        
    8576        /** Some useful descriptors for USB device. */
    8677        usb_device_descriptors_t descriptors;
    87        
    8878        /** Generic DDF device backing this one. DO NOT TOUCH! */
    8979        ddf_dev_t *ddf_dev;
    90        
    9180        /** Custom driver data.
    92          *
    9381         * Do not use the entry in generic device, that is already used
    9482         * by the framework.
    9583         */
    9684        void *driver_data;
     85
    9786} usb_device_t;
    9887
     
    146135                return rc;
    147136        }
    148        
     137
    149138        /* Change current alternative */
    150139        usb_dev->alternate_interfaces.current = alternate_setting;
     
    290279 *
    291280 * @param[in] usb_dev USB device.
    292  *
    293281 */
    294282void usb_device_destroy_pipes(usb_device_t *usb_dev)
     
    296284        assert(usb_dev);
    297285        assert(usb_dev->pipes || usb_dev->pipes_count == 0);
    298        
    299286        /* Destroy the pipes. */
    300287        for (size_t i = 0; i < usb_dev->pipes_count; ++i) {
     
    304291                        usb_pipe_unregister(&usb_dev->pipes[i].pipe);
    305292        }
    306        
    307293        free(usb_dev->pipes);
    308294        usb_dev->pipes = NULL;
     
    462448        assert(handle);
    463449        assert(iface_no);
    464        
    465450        async_exch_t *exch = async_exchange_begin(sess);
    466451        if (!exch)
    467452                return EPARTY;
    468        
    469453        int ret = usb_get_my_device_handle(exch, handle);
    470454        if (ret == EOK) {
     
    475459                }
    476460        }
    477        
    478461        async_exchange_end(exch);
    479462        return ret;
Note: See TracChangeset for help on using the changeset viewer.