Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/uhci/utils/malloc32.h

    rbf9cb2f r8064c2f6  
    3636
    3737#include <as.h>
    38 #include <assert.h>
    3938#include <ddi.h>
    4039#include <errno.h>
    4140#include <malloc.h>
    42 #include <mem.h>
    43 #include <unistd.h>
     41#include <sys/types.h>
    4442
    45 #define UHCI_STRCUTURES_ALIGNMENT 16
     43#define UHCI_STRUCTURES_ALIGNMENT 16
    4644#define UHCI_REQUIRED_PAGE_SIZE 4096
    4745
     
    5654        if (addr == NULL)
    5755                return 0;
    58        
     56
    5957        uintptr_t result;
    6058        const int ret = as_get_physical_mapping(addr, &result);
    6159        if (ret != EOK)
    6260                return 0;
    63        
     61
    6462        return result;
    6563}
     
    8179        /* Calculate alignment to make sure the block won't cross page
    8280         * boundary */
    83         size_t alignment = UHCI_STRCUTURES_ALIGNMENT;
     81        size_t alignment = UHCI_STRUCTURES_ALIGNMENT;
    8482        while (alignment < size)
    8583                alignment *= 2;
     
    103101{
    104102        uintptr_t phys;
    105         void *address = AS_AREA_ANY;
    106        
     103        void *address;
     104
    107105        const int ret = dmamem_map_anonymous(UHCI_REQUIRED_PAGE_SIZE,
    108106            DMAMEM_4GiB, AS_AREA_READ | AS_AREA_WRITE, 0, &phys,
    109107            &address);
    110        
     108
    111109        return ((ret == EOK) ? address : NULL);
    112110}
Note: See TracChangeset for help on using the changeset viewer.