diff options
Diffstat (limited to 'drivers/usb/host')
-rw-r--r-- | drivers/usb/host/dwc3-octeon-glue.c | 1 | ||||
-rw-r--r-- | drivers/usb/host/xhci-mem.c | 21 | ||||
-rw-r--r-- | drivers/usb/host/xhci-mtk.c | 5 | ||||
-rw-r--r-- | drivers/usb/host/xhci.c | 7 |
4 files changed, 17 insertions, 17 deletions
diff --git a/drivers/usb/host/dwc3-octeon-glue.c b/drivers/usb/host/dwc3-octeon-glue.c index 39b3185616..c3cac9c5ab 100644 --- a/drivers/usb/host/dwc3-octeon-glue.c +++ b/drivers/usb/host/dwc3-octeon-glue.c @@ -13,6 +13,7 @@ #include <errno.h> #include <usb.h> #include <asm/io.h> +#include <dm/device_compat.h> #include <dm/lists.h> #include <dm/of_access.h> #include <linux/bitfield.h> diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index 0b49614995..b002d6f166 100644 --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c @@ -279,10 +279,10 @@ static struct xhci_segment *xhci_segment_alloc(void) { struct xhci_segment *seg; - seg = (struct xhci_segment *)malloc(sizeof(struct xhci_segment)); + seg = malloc(sizeof(struct xhci_segment)); BUG_ON(!seg); - seg->trbs = (union xhci_trb *)xhci_malloc(SEGMENT_SIZE); + seg->trbs = xhci_malloc(SEGMENT_SIZE); seg->next = NULL; @@ -309,7 +309,7 @@ struct xhci_ring *xhci_ring_alloc(unsigned int num_segs, bool link_trbs) struct xhci_ring *ring; struct xhci_segment *prev; - ring = (struct xhci_ring *)malloc(sizeof(struct xhci_ring)); + ring = malloc(sizeof(struct xhci_ring)); BUG_ON(!ring); if (num_segs == 0) @@ -425,8 +425,7 @@ static struct xhci_container_ctx { struct xhci_container_ctx *ctx; - ctx = (struct xhci_container_ctx *) - malloc(sizeof(struct xhci_container_ctx)); + ctx = malloc(sizeof(struct xhci_container_ctx)); BUG_ON(!ctx); BUG_ON((type != XHCI_CTX_TYPE_DEVICE) && (type != XHCI_CTX_TYPE_INPUT)); @@ -436,7 +435,7 @@ static struct xhci_container_ctx if (type == XHCI_CTX_TYPE_INPUT) ctx->size += CTX_SIZE(readl(&ctrl->hccr->cr_hccparams)); - ctx->bytes = (u8 *)xhci_malloc(ctx->size); + ctx->bytes = xhci_malloc(ctx->size); return ctx; } @@ -458,8 +457,7 @@ int xhci_alloc_virt_device(struct xhci_ctrl *ctrl, unsigned int slot_id) return -EEXIST; } - ctrl->devs[slot_id] = (struct xhci_virt_device *) - malloc(sizeof(struct xhci_virt_device)); + ctrl->devs[slot_id] = malloc(sizeof(struct xhci_virt_device)); if (!ctrl->devs[slot_id]) { puts("Failed to allocate virtual device\n"); @@ -518,8 +516,7 @@ int xhci_mem_init(struct xhci_ctrl *ctrl, struct xhci_hccr *hccr, struct xhci_segment *seg; /* DCBAA initialization */ - ctrl->dcbaa = (struct xhci_device_context_array *) - xhci_malloc(sizeof(struct xhci_device_context_array)); + ctrl->dcbaa = xhci_malloc(sizeof(struct xhci_device_context_array)); if (ctrl->dcbaa == NULL) { puts("unable to allocate DCBA\n"); return -ENOMEM; @@ -555,8 +552,8 @@ int xhci_mem_init(struct xhci_ctrl *ctrl, struct xhci_hccr *hccr, /* Event ring does not maintain link TRB */ ctrl->event_ring = xhci_ring_alloc(ERST_NUM_SEGS, false); - ctrl->erst.entries = (struct xhci_erst_entry *) - xhci_malloc(sizeof(struct xhci_erst_entry) * ERST_NUM_SEGS); + ctrl->erst.entries = xhci_malloc(sizeof(struct xhci_erst_entry) * + ERST_NUM_SEGS); ctrl->erst.num_entries = ERST_NUM_SEGS; diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c index f3f181dae0..f62e232d21 100644 --- a/drivers/usb/host/xhci-mtk.c +++ b/drivers/usb/host/xhci-mtk.c @@ -7,15 +7,16 @@ #include <clk.h> #include <common.h> #include <dm.h> +#include <dm/device_compat.h> #include <dm/devres.h> #include <generic-phy.h> #include <malloc.h> +#include <power/regulator.h> #include <usb.h> +#include <usb/xhci.h> #include <linux/errno.h> #include <linux/compat.h> -#include <power/regulator.h> #include <linux/iopoll.h> -#include <usb/xhci.h> /* IPPC (IP Port Control) registers */ #define IPPC_IP_PW_CTRL0 0x00 diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 3547a9bad1..7080f8fabe 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -22,11 +22,13 @@ #include <common.h> #include <cpu_func.h> #include <dm.h> +#include <dm/device_compat.h> #include <log.h> -#include <asm/byteorder.h> -#include <usb.h> #include <malloc.h> +#include <usb.h> +#include <usb/xhci.h> #include <watchdog.h> +#include <asm/byteorder.h> #include <asm/cache.h> #include <asm/unaligned.h> #include <linux/bitops.h> @@ -34,7 +36,6 @@ #include <linux/delay.h> #include <linux/errno.h> #include <linux/iopoll.h> -#include <usb/xhci.h> #ifndef CONFIG_USB_MAX_CONTROLLER_COUNT #define CONFIG_USB_MAX_CONTROLLER_COUNT 1 |