Changeset c01987c in mainline


Ignore:
Timestamp:
2013-09-28T18:56:52Z (11 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8d2e251
Parents:
534dee89
Message:

libusbdev: Sanitize headers.

Include what you use.
https://code.google.com/p/include-what-you-use/

Location:
uspace
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/uhci/hw_struct/transfer_descriptor.h

    r534dee89 rc01987c  
    3535#define DRV_UHCI_HW_STRUCT_TRANSFER_DESCRIPTOR_H
    3636
     37#include <assert.h>
    3738#include <mem.h>
    3839#include <usb/usb.h>
  • uspace/lib/usbdev/include/usb/dev/alternate_ifaces.h

    r534dee89 rc01987c  
    3939
    4040#include <usb/descriptor.h>
     41#include <sys/types.h>
    4142
    4243/** Wrapper for data related to alternate interface setting.
  • uspace/lib/usbdev/include/usb/dev/device.h

    r534dee89 rc01987c  
    3838
    3939#include <ddf/driver.h>
     40#include <usb/usb.h>
     41#include <usb/descriptor.h>
    4042#include <usb/dev/alternate_ifaces.h>
    4143#include <usb/dev/pipes.h>
     44
     45#include <assert.h>
     46#include <async.h>
    4247
    4348/** Some useful descriptors for USB device. */
  • uspace/lib/usbdev/include/usb/dev/dp.h

    r534dee89 rc01987c  
    3737
    3838#include <sys/types.h>
    39 #include <usb/usb.h>
    40 #include <usb/descriptor.h>
    4139
    4240/** USB descriptors nesting.
  • uspace/lib/usbdev/include/usb/dev/pipes.h

    r534dee89 rc01987c  
    3535#define LIBUSBDEV_PIPES_H_
    3636
    37 #include <sys/types.h>
    38 #include <ipc/devman.h>
    39 #include <ddf/driver.h>
    40 #include <fibril_synch.h>
    4137#include <usb/usb.h>
    4238#include <usb/descriptor.h>
    4339#include <usb_iface.h>
     40
     41#include <stdbool.h>
     42#include <sys/types.h>
    4443
    4544#define CTRL_PIPE_MIN_PACKET_SIZE 8
  • uspace/lib/usbdev/include/usb/dev/poll.h

    r534dee89 rc01987c  
    3636#define LIBUSBDEV_POLL_H_
    3737
    38 #include <usb/dev/driver.h>
    39 #include <time.h>
     38#include <usb/usb.h>
     39#include <usb/dev/device.h>
     40#include <usb/dev/pipes.h>
     41
     42#include <stdbool.h>
     43#include <sys/types.h>
    4044
    4145/** Parameters and callbacks for automated polling. */
  • uspace/lib/usbdev/include/usb/dev/recognise.h

    r534dee89 rc01987c  
    3737#define LIBUSBDEV_RECOGNISE_H_
    3838
    39 #include <usb/usb.h>
     39#include <usb/descriptor.h>
    4040#include <usb/dev/pipes.h>
     41
     42#include <devman.h>
    4143
    4244extern int usb_device_create_match_ids_from_device_descriptor(
  • uspace/lib/usbdev/src/altiface.c

    r534dee89 rc01987c  
    3636#include <usb/dev/alternate_ifaces.h>
    3737#include <usb/dev/dp.h>
    38 #include <malloc.h>
     38#include <assert.h>
    3939#include <errno.h>
    40 #include <assert.h>
     40#include <stdlib.h>
    4141
    4242/** Count number of alternate settings of a interface.
     
    103103        }
    104104
    105         const size_t alt_count =usb_interface_count_alternates(config_descr,
     105        const size_t alt_count = usb_interface_count_alternates(config_descr,
    106106            config_descr_size, interface_number);
    107107
  • uspace/lib/usbdev/src/devdrv.c

    r534dee89 rc01987c  
    3535
    3636#include <usb_iface.h>
     37#include <usb/dev/alternate_ifaces.h>
    3738#include <usb/dev/device.h>
     39#include <usb/dev/pipes.h>
    3840#include <usb/dev/request.h>
    3941#include <usb/debug.h>
    40 #include <usb/dev.h>
     42#include <usb/descriptor.h>
     43#include <usb/usb.h>
     44
     45#include <assert.h>
     46#include <async.h>
     47#include <devman.h>
    4148#include <errno.h>
    42 #include <str_error.h>
    43 #include <assert.h>
     49#include <stdlib.h>
     50
     51#include <ddf/driver.h>
    4452
    4553/** USB device structure. */
  • uspace/lib/usbdev/src/devpoll.c

    r534dee89 rc01987c  
    3333 * USB device driver framework - automatic interrupt polling.
    3434 */
     35#include <usb/dev/device.h>
     36#include <usb/dev/pipes.h>
    3537#include <usb/dev/poll.h>
    3638#include <usb/dev/request.h>
     39#include <usb/classes/classes.h>
    3740#include <usb/debug.h>
    38 #include <usb/classes/classes.h>
     41#include <usb/descriptor.h>
     42#include <usb/usb.h>
     43
     44#include <assert.h>
     45#include <async.h>
    3946#include <errno.h>
     47#include <fibril.h>
     48#include <stdbool.h>
     49#include <stdlib.h>
    4050#include <str_error.h>
    41 #include <assert.h>
     51#include <sys/types.h>
    4252
    4353/** Maximum number of failed consecutive requests before announcing failure. */
  • uspace/lib/usbdev/src/dp.c

    r534dee89 rc01987c  
    4141 * sibling.
    4242 */
    43 #include <stdio.h>
    44 #include <str_error.h>
    45 #include <errno.h>
    46 #include <assert.h>
    47 #include <stdbool.h>
    4843#include <usb/dev/dp.h>
    4944#include <usb/descriptor.h>
     45
     46#include <assert.h>
     47#include <errno.h>
     48#include <stdlib.h>
     49#include <stdbool.h>
     50#include <sys/types.h>
    5051
    5152#define NESTING(parentname, childname) \
  • uspace/lib/usbdev/src/driver.c

    r534dee89 rc01987c  
    3535
    3636#include <usb/dev/driver.h>
     37#include <usb/dev/device.h>
     38#include <usb/debug.h>
     39
     40#include <assert.h>
    3741#include <errno.h>
    3842#include <str_error.h>
    39 #include <usb/debug.h>
     43#include <ddf/driver.h>
    4044
    4145static const usb_driver_t *driver = NULL;
  • uspace/lib/usbdev/src/pipes.c

    r534dee89 rc01987c  
    3535#include <usb/dev/pipes.h>
    3636#include <usb/dev/request.h>
     37#include <usb/usb.h>
     38#include <usb_iface.h>
     39
     40#include <assert.h>
     41#include <async.h>
    3742#include <errno.h>
    38 #include <assert.h>
     43#include <mem.h>
    3944
    4045/** Try to clear endpoint halt of default control pipe.
  • uspace/lib/usbdev/src/pipesinit.c

    r534dee89 rc01987c  
    3434 *
    3535 */
    36 #include <usb/usb.h>
    3736#include <usb/dev/pipes.h>
    3837#include <usb/dev/dp.h>
    3938#include <usb/dev/request.h>
     39#include <usb/usb.h>
     40#include <usb/descriptor.h>
     41
     42#include <assert.h>
    4043#include <errno.h>
    41 #include <assert.h>
    4244
    4345#define DEV_DESCR_MAX_PACKET_SIZE_OFFSET 7
  • uspace/lib/usbdev/src/recognise.c

    r534dee89 rc01987c  
    3434 */
    3535
    36 #include <sys/types.h>
    37 #include <fibril_synch.h>
    38 #include <usb/debug.h>
    3936#include <usb/dev/pipes.h>
    4037#include <usb/dev/recognise.h>
    4138#include <usb/dev/request.h>
    4239#include <usb/classes/classes.h>
     40
     41#include <assert.h>
     42#include <errno.h>
    4343#include <stdio.h>
    44 #include <errno.h>
    45 #include <assert.h>
     44#include <sys/types.h>
    4645
    4746/** Get integer part from BCD coded number. */
     
    235234                    (int) device_descriptor->product_id,
    236235                    BCD_ARGS(device_descriptor->device_version));
    237                
     236
    238237                /* Next, without release number. */
    239238                ADD_MATCHID_OR_RETURN(matches, 90,
     
    241240                    (int) device_descriptor->vendor_id,
    242241                    (int) device_descriptor->product_id);
    243         }       
     242        }
    244243
    245244        /* Class match id */
    246245        ADD_MATCHID_OR_RETURN(matches, 50, "usb&class=%s",
    247246            usb_str_class(device_descriptor->device_class));
    248        
     247
    249248        /* As a last resort, try fallback driver. */
    250249        ADD_MATCHID_OR_RETURN(matches, 10, "usb&fallback");
  • uspace/lib/usbdev/src/request.c

    r534dee89 rc01987c  
    3434 */
    3535#include <usb/dev/request.h>
     36#include <usb/request.h>
     37#include <usb/usb.h>
     38
    3639#include <errno.h>
    37 #include <assert.h>
    38 #include <usb/debug.h>
     40#include <mem.h>
     41#include <stdlib.h>
     42#include <str.h>
    3943
    4044#define MAX_DATA_LENGTH ((size_t)(0xFFFF))
Note: See TracChangeset for help on using the changeset viewer.