Changeset 9871bca in mainline


Ignore:
Timestamp:
2011-10-30T13:12:19Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
fbe148ee
Parents:
aa05b29
Message:

usbmast: Add device_remove stub.

Add const qualifiers.

File:
1 edited

Legend:

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

    raa05b29 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,
     
    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.