Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/usbmast/main.c

    r721d4b6e r9871bca  
    5555#define GET_BULK_OUT(dev) ((dev)->pipes[BULK_OUT_EP].pipe)
    5656
    57 static usb_endpoint_description_t bulk_in_ep = {
     57static const usb_endpoint_description_t bulk_in_ep = {
    5858        .transfer_type = USB_TRANSFER_BULK,
    5959        .direction = USB_DIRECTION_IN,
     
    6363        .flags = 0
    6464};
    65 static usb_endpoint_description_t bulk_out_ep = {
     65static const usb_endpoint_description_t bulk_out_ep = {
    6666        .transfer_type = USB_TRANSFER_BULK,
    6767        .direction = USB_DIRECTION_OUT,
     
    7272};
    7373
    74 usb_endpoint_description_t *mast_endpoints[] = {
     74static const usb_endpoint_description_t *mast_endpoints[] = {
    7575        &bulk_in_ep,
    7676        &bulk_out_ep,
     
    106106}
    107107
     108/** Callback when a device is about to be removed.
     109 *
     110 * @param dev Representation of USB device.
     111 * @return Error code.
     112 */
     113static int usbmast_device_remove(usb_device_t *dev)
     114{
     115        //TODO: flush buffers, or whatever.
     116        return ENOTSUP;
     117}
     118
    108119/** Callback when new device is attached and recognized as a mass storage.
    109120 *
    110  * @param dev Representation of a the USB device.
     121 * @param dev Representation of USB device.
    111122 * @return Error code.
    112123 */
     
    336347
    337348/** USB mass storage driver ops. */
    338 static usb_driver_ops_t usbmast_driver_ops = {
     349static const usb_driver_ops_t usbmast_driver_ops = {
    339350        .device_add = usbmast_device_add,
     351        .device_rem = usbmast_device_remove,
    340352        .device_gone = usbmast_device_gone,
    341353};
    342354
    343355/** USB mass storage driver. */
    344 static usb_driver_t usbmast_driver = {
     356static const usb_driver_t usbmast_driver = {
    345357        .name = NAME,
    346358        .ops = &usbmast_driver_ops,
Note: See TracChangeset for help on using the changeset viewer.