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

Changeset bb58dc0b in mainline


Ignore:
Timestamp:
2011-07-11T15:29:03Z (10 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master
Children:
56c6b88
Parents:
40c6cdf
Message:

OHCI: Root hub: Remove small useless functions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/ohci/root_hub.c

    r40c6cdf rbb58dc0b  
    165165    rh_t *instance, usb_transfer_batch_t *request);
    166166
    167 
    168167static int get_descriptor_request(
    169168    rh_t *instance, usb_transfer_batch_t *request);
    170169
    171 static int get_configuration_request(
    172     rh_t *instance, usb_transfer_batch_t *request);
    173 
    174170static int port_feature_set_request(
    175171    rh_t *instance, uint16_t feature, uint16_t port);
     
    194190static bool is_zeros(const void *buffer, size_t size);
    195191
    196 /**
    197  * Register address to this device
    198  *
    199  * @param instance Root hub instance
    200  * @param address New address
    201  * @return Error code
    202  */
    203 static inline int address_set_request(rh_t *instance, uint16_t address)
    204         { return ENOTSUP; }
     192
     193#define TRANSFER_OK(bytes) \
     194do { \
     195        request->transfered_size = bytes; \
     196        return EOK; \
     197while (0);
    205198
    206199/** Root hub initialization
     
    564557/*----------------------------------------------------------------------------*/
    565558/**
    566  * Answer to get configuration request.
    567  *
    568  * Root hub works independently on the configuration.
    569  * Set and get configuration requests do not have any meaning,
    570  * dummy values are returned.
    571  *
    572  * @param instance Root hub instance
    573  * @param request Structure containing both request and response information
    574  * @return Error code
    575  */
    576 int get_configuration_request(
    577     rh_t *instance, usb_transfer_batch_t *request)
    578 {
    579         assert(request);
    580 
    581         if (request->buffer_size != 1)
    582                 return EINVAL;
    583         request->data_buffer[0] = 1;
    584         request->transfered_size = 1;
    585 
    586         return EOK;
    587 }
    588 /*----------------------------------------------------------------------------*/
    589 /**
    590559 * process feature-enabling request on hub
    591560 *
     
    671640        case USB_DEVREQ_GET_CONFIGURATION:
    672641                usb_log_debug("USB_DEVREQ_GET_CONFIGURATION\n");
    673                 return get_configuration_request(instance, request);
     642                if (request->buffer_size != 1)
     643                        return EINVAL;
     644                request->data_buffer[0] = 1;
     645                request->transfered_size = 1;
     646                return EOK;
    674647        }
    675648        return ENOTSUP;
     
    767740        case USB_DEVREQ_SET_ADDRESS:
    768741                usb_log_debug("USB_DEVREQ_SET_ADDRESS\n");
    769                 return address_set_request(instance, setup_request->value);
     742                return ENOTSUP;
    770743
    771744        default:
Note: See TracChangeset for help on using the changeset viewer.