Ignore:
Timestamp:
2011-10-14T12:40:31Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e5024111
Parents:
3002434
Message:

usbhid: Remove tabs on empty lines. diff -w shows no changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/usbhid/generic/hiddev.c

    r3002434 rcc29622  
    9292        usb_log_debug2("Generic HID: Get event length (fun: %p, "
    9393            "fun->driver_data: %p.\n", fun, fun->driver_data);
    94        
     94
    9595        if (fun == NULL || fun->driver_data == NULL) {
    9696                return 0;
     
    9898
    9999        usb_hid_dev_t *hid_dev = (usb_hid_dev_t *)fun->driver_data;
    100        
     100
    101101        usb_log_debug2("hid_dev: %p, Max input report size (%zu).\n",
    102102            hid_dev, hid_dev->max_input_report_size);
    103        
     103
    104104        return hid_dev->max_input_report_size;
    105105}
     
    111111{
    112112        usb_log_debug2("Generic HID: Get event.\n");
    113        
     113
    114114        if (fun == NULL || fun->driver_data == NULL || buffer == NULL
    115115            || act_size == NULL || event_nr == NULL) {
     
    119119
    120120        usb_hid_dev_t *hid_dev = (usb_hid_dev_t *)fun->driver_data;
    121        
     121
    122122        if (hid_dev->input_report_size > size) {
    123123                usb_log_debug("input_report_size > size (%zu, %zu)\n",
     
    125125                return EINVAL;  // TODO: other error code
    126126        }
    127        
     127
    128128        /*! @todo This should probably be somehow atomic. */
    129129        memcpy(buffer, hid_dev->input_report,
     
    131131        *act_size = hid_dev->input_report_size;
    132132        *event_nr = usb_hid_report_number(hid_dev);
    133        
     133
    134134        usb_log_debug2("OK\n");
    135        
     135
    136136        return EOK;
    137137}
     
    142142{
    143143        usb_log_debug("Generic HID: Get report descriptor length.\n");
    144        
     144
    145145        if (fun == NULL || fun->driver_data == NULL) {
    146146                usb_log_debug("No function");
    147147                return EINVAL;
    148148        }
    149        
    150         usb_hid_dev_t *hid_dev = (usb_hid_dev_t *)fun->driver_data;
    151        
     149
     150        usb_hid_dev_t *hid_dev = (usb_hid_dev_t *)fun->driver_data;
     151
    152152        usb_log_debug2("hid_dev->report_desc_size = %zu\n",
    153153            hid_dev->report_desc_size);
    154        
     154
    155155        return hid_dev->report_desc_size;
    156156}
     
    162162{
    163163        usb_log_debug2("Generic HID: Get report descriptor.\n");
    164        
     164
    165165        if (fun == NULL || fun->driver_data == NULL) {
    166166                usb_log_debug("No function");
    167167                return EINVAL;
    168168        }
    169        
    170         usb_hid_dev_t *hid_dev = (usb_hid_dev_t *)fun->driver_data;
    171        
     169
     170        usb_hid_dev_t *hid_dev = (usb_hid_dev_t *)fun->driver_data;
     171
    172172        if (hid_dev->report_desc_size > size) {
    173173                return EINVAL;
    174174        }
    175        
     175
    176176        memcpy(desc, hid_dev->report_desc, hid_dev->report_desc_size);
    177177        *actual_size = hid_dev->report_desc_size;
    178        
     178
    179179        return EOK;
    180180}
     
    201201                return ENOMEM;
    202202        }
    203        
     203
    204204        fun->ops = &usb_generic_hid_ops;
    205205        fun->driver_data = hid_dev;
     
    212212                return rc;
    213213        }
    214        
     214
    215215        usb_log_debug("HID function created. Handle: %" PRIun "\n", fun->handle);
    216        
     216
    217217        return EOK;
    218218}
     
    225225                return EINVAL;
    226226        }
    227        
     227
    228228        return usb_generic_hid_create_function(hid_dev);
    229229}
Note: See TracChangeset for help on using the changeset viewer.