···109109#define DecHt_HostSwReset 0x340000110110#define BC_DRAM_FW_CFG_ADDR 0x001c2000111111112112-typedef union _addr_64_ {112112+union addr_64 {113113 struct {114114 uint32_t low_part;115115 uint32_t high_part;···117117118118 uint64_t full_addr;119119120120-} addr_64;120120+};121121122122-typedef union _intr_mask_reg_ {122122+union intr_mask_reg {123123 struct {124124 uint32_t mask_tx_done:1;125125 uint32_t mask_tx_err:1;···133133134134 uint32_t whole_reg;135135136136-} intr_mask_reg;136136+};137137138138-typedef union _link_misc_perst_deco_ctrl_ {138138+union link_misc_perst_deco_ctrl {139139 struct {140140 uint32_t bcm7412_rst:1; /* 1 -> BCM7412 is held in reset. Reset value 1.*/141141 uint32_t reserved0:3; /* Reserved.No Effect*/···145145146146 uint32_t whole_reg;147147148148-} link_misc_perst_deco_ctrl;148148+};149149150150-typedef union _link_misc_perst_clk_ctrl_ {150150+union link_misc_perst_clk_ctrl {151151 struct {152152 uint32_t sel_alt_clk:1; /* When set, selects a 6.75MHz clock as the source of core_clk */153153 uint32_t stop_core_clk:1; /* When set, stops the branch of core_clk that is not needed for low power operation */···161161162162 uint32_t whole_reg;163163164164-} link_misc_perst_clk_ctrl;164164+};165165166166-167167-typedef union _link_misc_perst_decoder_ctrl_ {166166+union link_misc_perst_decoder_ctrl {168167 struct {169168 uint32_t bcm_7412_rst:1; /* 1 -> BCM7412 is held in reset. Reset value 1.*/170169 uint32_t res0:3; /* Reserved.No Effect*/···173174174175 uint32_t whole_reg;175176176176-} link_misc_perst_decoder_ctrl;177177+};177178178178-179179-typedef union _desc_low_addr_reg_ {179179+union desc_low_addr_reg {180180 struct {181181 uint32_t list_valid:1;182182 uint32_t reserved:4;···184186185187 uint32_t whole_reg;186188187187-} desc_low_addr_reg;189189+};188190189189-typedef struct _dma_descriptor_ { /* 8 32-bit values */191191+struct dma_descriptor { /* 8 32-bit values */190192 /* 0th u32 */191193 uint32_t sdram_buff_addr:28; /* bits 0-27: SDRAM Address */192194 uint32_t res0:4; /* bits 28-31: Reserved */···218220 /* 7th u32 */219221 uint32_t res8; /* Last 32bits reserved */220222221221-} dma_descriptor, *pdma_descriptor;223223+};222224223225/*224226 * We will allocate the memory in 4K pages225227 * the linked list will be a list of 32 byte descriptors.226228 * The virtual address will determine what should be freed.227229 */228228-typedef struct _dma_desc_mem_ {229229- pdma_descriptor pdma_desc_start; /* 32-bytes for dma descriptor. should be first element */230230+struct dma_desc_mem {231231+ struct dma_descriptor *pdma_desc_start; /* 32-bytes for dma descriptor. should be first element */230232 dma_addr_t phy_addr; /* physical address of each DMA desc */231233 uint32_t sz;232234 struct _dma_desc_mem_ *Next; /* points to Next Descriptor in chain */233235234234-} dma_desc_mem, *pdma_desc_mem;236236+};235237236236-237237-238238-typedef enum _list_sts_ {238238+enum list_sts {239239 sts_free = 0,240240241241 /* RX-Y Bits 0:7 */···249253250254 rx_y_mask = 0x000000FF,251255 rx_uv_mask = 0x0000FF00,256256+};252257253253-} list_sts;254254-255255-typedef struct _tx_dma_pkt_ {256256- dma_desc_mem desc_mem;258258+struct tx_dma_pkt {259259+ struct dma_desc_mem desc_mem;257260 hw_comp_callback call_back;258258- crystalhd_dio_req *dio_req;261261+ struct crystalhd_dio_req *dio_req;259262 wait_queue_head_t *cb_event;260263 uint32_t list_tag;264264+};261265262262-} tx_dma_pkt;263263-264264-typedef struct _crystalhd_rx_dma_pkt {265265- dma_desc_mem desc_mem;266266- crystalhd_dio_req *dio_req;266266+struct crystalhd_rx_dma_pkt {267267+ struct dma_desc_mem desc_mem;268268+ struct crystalhd_dio_req *dio_req;267269 uint32_t pkt_tag;268270 uint32_t flags;269269- BC_PIC_INFO_BLOCK pib;271271+ struct BC_PIC_INFO_BLOCK pib;270272 dma_addr_t uv_phy_addr;271271- struct _crystalhd_rx_dma_pkt *next;273273+ struct crystalhd_rx_dma_pkt *next;274274+};272275273273-} crystalhd_rx_dma_pkt;274274-275275-struct crystalhd_hw_stats{276276+struct crystalhd_hw_stats {276277 uint32_t rx_errors;277278 uint32_t tx_errors;278279 uint32_t freeq_count;···281288};282289283290struct crystalhd_hw {284284- tx_dma_pkt tx_pkt_pool[DMA_ENGINE_CNT];291291+ struct tx_dma_pkt tx_pkt_pool[DMA_ENGINE_CNT];285292 spinlock_t lock;286293287294 uint32_t tx_ioq_tag_seed;288295 uint32_t tx_list_post_index;289296290290- crystalhd_rx_dma_pkt *rx_pkt_pool_head;297297+ struct crystalhd_rx_dma_pkt *rx_pkt_pool_head;291298 uint32_t rx_pkt_tag_seed;292299293300 bool dev_started;···299306 uint32_t pib_del_Q_addr;300307 uint32_t pib_rel_Q_addr;301308302302- crystalhd_dioq_t *tx_freeq;303303- crystalhd_dioq_t *tx_actq;309309+ struct crystalhd_dioq *tx_freeq;310310+ struct crystalhd_dioq *tx_actq;304311305312 /* Rx DMA Engine Specific Locks */306313 spinlock_t rx_lock;307314 uint32_t rx_list_post_index;308308- list_sts rx_list_sts[DMA_ENGINE_CNT];309309- crystalhd_dioq_t *rx_rdyq;310310- crystalhd_dioq_t *rx_freeq;311311- crystalhd_dioq_t *rx_actq;315315+ enum list_sts rx_list_sts[DMA_ENGINE_CNT];316316+ struct crystalhd_dioq *rx_rdyq;317317+ struct crystalhd_dioq *rx_freeq;318318+ struct crystalhd_dioq *rx_actq;312319 uint32_t stop_pending;313320314321 /* HW counters.. */···357364358365359366/**** API Exposed to the other layers ****/360360-BC_STATUS crystalhd_download_fw(struct crystalhd_adp *adp,367367+enum BC_STATUS crystalhd_download_fw(struct crystalhd_adp *adp,361368 void *buffer, uint32_t sz);362362-BC_STATUS crystalhd_do_fw_cmd(struct crystalhd_hw *hw, BC_FW_CMD *fw_cmd);369369+enum BC_STATUS crystalhd_do_fw_cmd(struct crystalhd_hw *hw, struct BC_FW_CMD *fw_cmd);363370bool crystalhd_hw_interrupt(struct crystalhd_adp *adp, struct crystalhd_hw *hw);364364-BC_STATUS crystalhd_hw_open(struct crystalhd_hw *, struct crystalhd_adp *);365365-BC_STATUS crystalhd_hw_close(struct crystalhd_hw *);366366-BC_STATUS crystalhd_hw_setup_dma_rings(struct crystalhd_hw *);367367-BC_STATUS crystalhd_hw_free_dma_rings(struct crystalhd_hw *);371371+enum BC_STATUS crystalhd_hw_open(struct crystalhd_hw *, struct crystalhd_adp *);372372+enum BC_STATUS crystalhd_hw_close(struct crystalhd_hw *);373373+enum BC_STATUS crystalhd_hw_setup_dma_rings(struct crystalhd_hw *);374374+enum BC_STATUS crystalhd_hw_free_dma_rings(struct crystalhd_hw *);368375369376370370-BC_STATUS crystalhd_hw_post_tx(struct crystalhd_hw *hw, crystalhd_dio_req *ioreq,377377+enum BC_STATUS crystalhd_hw_post_tx(struct crystalhd_hw *hw, struct crystalhd_dio_req *ioreq,371378 hw_comp_callback call_back,372379 wait_queue_head_t *cb_event,373380 uint32_t *list_id, uint8_t data_flags);374381375375-BC_STATUS crystalhd_hw_pause(struct crystalhd_hw *hw);376376-BC_STATUS crystalhd_hw_unpause(struct crystalhd_hw *hw);377377-BC_STATUS crystalhd_hw_suspend(struct crystalhd_hw *hw);378378-BC_STATUS crystalhd_hw_cancel_tx(struct crystalhd_hw *hw, uint32_t list_id);379379-BC_STATUS crystalhd_hw_add_cap_buffer(struct crystalhd_hw *hw,380380- crystalhd_dio_req *ioreq, bool en_post);381381-BC_STATUS crystalhd_hw_get_cap_buffer(struct crystalhd_hw *hw,382382- BC_PIC_INFO_BLOCK *pib,383383- crystalhd_dio_req **ioreq);384384-BC_STATUS crystalhd_hw_stop_capture(struct crystalhd_hw *hw);385385-BC_STATUS crystalhd_hw_start_capture(struct crystalhd_hw *hw);382382+enum BC_STATUS crystalhd_hw_pause(struct crystalhd_hw *hw);383383+enum BC_STATUS crystalhd_hw_unpause(struct crystalhd_hw *hw);384384+enum BC_STATUS crystalhd_hw_suspend(struct crystalhd_hw *hw);385385+enum BC_STATUS crystalhd_hw_cancel_tx(struct crystalhd_hw *hw, uint32_t list_id);386386+enum BC_STATUS crystalhd_hw_add_cap_buffer(struct crystalhd_hw *hw,387387+ struct crystalhd_dio_req *ioreq, bool en_post);388388+enum BC_STATUS crystalhd_hw_get_cap_buffer(struct crystalhd_hw *hw,389389+ struct BC_PIC_INFO_BLOCK *pib,390390+ struct crystalhd_dio_req **ioreq);391391+enum BC_STATUS crystalhd_hw_stop_capture(struct crystalhd_hw *hw);392392+enum BC_STATUS crystalhd_hw_start_capture(struct crystalhd_hw *hw);386393void crystalhd_hw_stats(struct crystalhd_hw *hw, struct crystalhd_hw_stats *stats);387394388395/* API to program the core clock on the decoder */389389-BC_STATUS crystalhd_hw_set_core_clock(struct crystalhd_hw *);396396+enum BC_STATUS crystalhd_hw_set_core_clock(struct crystalhd_hw *);390397391398#endif
+17-17
drivers/staging/crystalhd/crystalhd_lnx.c
···7373 return 0;7474}75757676-crystalhd_ioctl_data *chd_dec_alloc_iodata(struct crystalhd_adp *adp, bool isr)7676+struct crystalhd_ioctl_data *chd_dec_alloc_iodata(struct crystalhd_adp *adp, bool isr)7777{7878 unsigned long flags = 0;7979- crystalhd_ioctl_data *temp;7979+ struct crystalhd_ioctl_data *temp;80808181 if (!adp)8282 return NULL;···9393 return temp;9494}95959696-void chd_dec_free_iodata(struct crystalhd_adp *adp, crystalhd_ioctl_data *iodata,9696+void chd_dec_free_iodata(struct crystalhd_adp *adp, struct crystalhd_ioctl_data *iodata,9797 bool isr)9898{9999 unsigned long flags = 0;···129129 return rc;130130}131131132132-static int chd_dec_fetch_cdata(struct crystalhd_adp *adp, crystalhd_ioctl_data *io,132132+static int chd_dec_fetch_cdata(struct crystalhd_adp *adp, struct crystalhd_ioctl_data *io,133133 uint32_t m_sz, unsigned long ua)134134{135135 unsigned long ua_off;···163163}164164165165static int chd_dec_release_cdata(struct crystalhd_adp *adp,166166- crystalhd_ioctl_data *io, unsigned long ua)166166+ struct crystalhd_ioctl_data *io, unsigned long ua)167167{168168 unsigned long ua_off;169169 int rc;···193193}194194195195static int chd_dec_proc_user_data(struct crystalhd_adp *adp,196196- crystalhd_ioctl_data *io,196196+ struct crystalhd_ioctl_data *io,197197 unsigned long ua, int set)198198{199199 int rc;···231231 uint32_t uid, uint32_t cmd, crystalhd_cmd_proc func)232232{233233 int rc;234234- crystalhd_ioctl_data *temp;235235- BC_STATUS sts = BC_STS_SUCCESS;234234+ struct crystalhd_ioctl_data *temp;235235+ enum BC_STATUS sts = BC_STS_SUCCESS;236236237237 temp = chd_dec_alloc_iodata(adp, 0);238238 if (!temp) {···296296{297297 struct crystalhd_adp *adp = chd_get_adp();298298 int rc = 0;299299- BC_STATUS sts = BC_STS_SUCCESS;299299+ enum BC_STATUS sts = BC_STS_SUCCESS;300300 struct crystalhd_user *uc = NULL;301301302302 BCMLOG_ENTER;···356356357357static int __devinit chd_dec_init_chdev(struct crystalhd_adp *adp)358358{359359- crystalhd_ioctl_data *temp;359359+ struct crystalhd_ioctl_data *temp;360360 struct device *dev;361361 int rc = -ENODEV, i = 0;362362···394394 /* Allocate general purpose ioctl pool. */395395 for (i = 0; i < CHD_IODATA_POOL_SZ; i++) {396396 /* FIXME: jarod: why atomic? */397397- temp = kzalloc(sizeof(crystalhd_ioctl_data), GFP_ATOMIC);397397+ temp = kzalloc(sizeof(struct crystalhd_ioctl_data), GFP_ATOMIC);398398 if (!temp) {399399 BCMLOG_ERR("ioctl data pool kzalloc failed\n");400400 rc = -ENOMEM;···418418419419static void __devexit chd_dec_release_chdev(struct crystalhd_adp *adp)420420{421421- crystalhd_ioctl_data *temp = NULL;421421+ struct crystalhd_ioctl_data *temp = NULL;422422 if (!adp)423423 return;424424···513513static void __devexit chd_dec_pci_remove(struct pci_dev *pdev)514514{515515 struct crystalhd_adp *pinfo;516516- BC_STATUS sts = BC_STS_SUCCESS;516516+ enum BC_STATUS sts = BC_STS_SUCCESS;517517518518 BCMLOG_ENTER;519519···543543{544544 struct crystalhd_adp *pinfo;545545 int rc;546546- BC_STATUS sts = BC_STS_SUCCESS;546546+ enum BC_STATUS sts = BC_STS_SUCCESS;547547548548 BCMLOG(BCMLOG_DBG, "PCI_INFO: Vendor:0x%04x Device:0x%04x "549549 "s_vendor:0x%04x s_device: 0x%04x\n",···623623int chd_dec_pci_suspend(struct pci_dev *pdev, pm_message_t state)624624{625625 struct crystalhd_adp *adp;626626- crystalhd_ioctl_data *temp;627627- BC_STATUS sts = BC_STS_SUCCESS;626626+ struct crystalhd_ioctl_data *temp;627627+ enum BC_STATUS sts = BC_STS_SUCCESS;628628629629 adp = (struct crystalhd_adp *)pci_get_drvdata(pdev);630630 if (!adp) {···657657int chd_dec_pci_resume(struct pci_dev *pdev)658658{659659 struct crystalhd_adp *adp;660660- BC_STATUS sts = BC_STS_SUCCESS;660660+ enum BC_STATUS sts = BC_STS_SUCCESS;661661 int rc;662662663663 adp = (struct crystalhd_adp *)pci_get_drvdata(pdev);
+3-3
drivers/staging/crystalhd/crystalhd_lnx.h
···7979 unsigned int chd_dec_major;8080 unsigned int cfg_users;81818282- crystalhd_ioctl_data *idata_free_head; /* ioctl data pool */8383- crystalhd_elem_t *elem_pool_head; /* Queue element pool */8282+ struct crystalhd_ioctl_data *idata_free_head; /* ioctl data pool */8383+ struct crystalhd_elem *elem_pool_head; /* Queue element pool */84848585 struct crystalhd_cmd cmds;86868787- crystalhd_dio_req *ua_map_free_head;8787+ struct crystalhd_dio_req *ua_map_free_head;8888 struct pci_pool *fill_byte_pool;8989};9090
+40-40
drivers/staging/crystalhd/crystalhd_misc.c
···4343 bc_dec_reg_wr(adp, (0x00380000 | (mem_off & 0x0007FFFF)), val);4444}45454646-static inline BC_STATUS bc_chk_dram_range(struct crystalhd_adp *adp, uint32_t start_off, uint32_t cnt)4646+static inline enum BC_STATUS bc_chk_dram_range(struct crystalhd_adp *adp, uint32_t start_off, uint32_t cnt)4747{4848 return BC_STS_SUCCESS;4949}50505151-static crystalhd_dio_req *crystalhd_alloc_dio(struct crystalhd_adp *adp)5151+static struct crystalhd_dio_req *crystalhd_alloc_dio(struct crystalhd_adp *adp)5252{5353 unsigned long flags = 0;5454- crystalhd_dio_req *temp = NULL;5454+ struct crystalhd_dio_req *temp = NULL;55555656 if (!adp) {5757 BCMLOG_ERR("Invalid Arg!!\n");···6767 return temp;6868}69697070-static void crystalhd_free_dio(struct crystalhd_adp *adp, crystalhd_dio_req *dio)7070+static void crystalhd_free_dio(struct crystalhd_adp *adp, struct crystalhd_dio_req *dio)7171{7272 unsigned long flags = 0;7373···8383 spin_unlock_irqrestore(&adp->lock, flags);8484}85858686-static crystalhd_elem_t *crystalhd_alloc_elem(struct crystalhd_adp *adp)8686+static struct crystalhd_elem *crystalhd_alloc_elem(struct crystalhd_adp *adp)8787{8888 unsigned long flags = 0;8989- crystalhd_elem_t *temp = NULL;8989+ struct crystalhd_elem *temp = NULL;90909191 if (!adp)9292 return temp;···100100101101 return temp;102102}103103-static void crystalhd_free_elem(struct crystalhd_adp *adp, crystalhd_elem_t *elem)103103+static void crystalhd_free_elem(struct crystalhd_adp *adp, struct crystalhd_elem *elem)104104{105105 unsigned long flags = 0;106106···230230 *231231 * 7412's Dram read routine.232232 */233233-BC_STATUS crystalhd_mem_rd(struct crystalhd_adp *adp, uint32_t start_off,233233+enum BC_STATUS crystalhd_mem_rd(struct crystalhd_adp *adp, uint32_t start_off,234234 uint32_t dw_cnt, uint32_t *rd_buff)235235{236236 uint32_t ix = 0;···258258 *259259 * 7412's Dram write routine.260260 */261261-BC_STATUS crystalhd_mem_wr(struct crystalhd_adp *adp, uint32_t start_off,261261+enum BC_STATUS crystalhd_mem_wr(struct crystalhd_adp *adp, uint32_t start_off,262262 uint32_t dw_cnt, uint32_t *wr_buff)263263{264264 uint32_t ix = 0;···286286 *287287 * Get value from Link's PCIe config space.288288 */289289-BC_STATUS crystalhd_pci_cfg_rd(struct crystalhd_adp *adp, uint32_t off,289289+enum BC_STATUS crystalhd_pci_cfg_rd(struct crystalhd_adp *adp, uint32_t off,290290 uint32_t len, uint32_t *val)291291{292292- BC_STATUS sts = BC_STS_SUCCESS;292292+ enum BC_STATUS sts = BC_STS_SUCCESS;293293 int rc = 0;294294295295 if (!adp || !val) {···331331 *332332 * Set value to Link's PCIe config space.333333 */334334-BC_STATUS crystalhd_pci_cfg_wr(struct crystalhd_adp *adp, uint32_t off,334334+enum BC_STATUS crystalhd_pci_cfg_wr(struct crystalhd_adp *adp, uint32_t off,335335 uint32_t len, uint32_t val)336336{337337- BC_STATUS sts = BC_STS_SUCCESS;337337+ enum BC_STATUS sts = BC_STS_SUCCESS;338338 int rc = 0;339339340340 if (!adp || !val) {···429429 * Initialize Generic DIO queue to hold any data. Callback430430 * will be used to free elements while deleting the queue.431431 */432432-BC_STATUS crystalhd_create_dioq(struct crystalhd_adp *adp,433433- crystalhd_dioq_t **dioq_hnd,432432+enum BC_STATUS crystalhd_create_dioq(struct crystalhd_adp *adp,433433+ struct crystalhd_dioq **dioq_hnd,434434 crystalhd_data_free_cb cb, void *cbctx)435435{436436- crystalhd_dioq_t *dioq = NULL;436436+ struct crystalhd_dioq *dioq = NULL;437437438438 if (!adp || !dioq_hnd) {439439 BCMLOG_ERR("Invalid arg!!\n");···446446447447 spin_lock_init(&dioq->lock);448448 dioq->sig = BC_LINK_DIOQ_SIG;449449- dioq->head = (crystalhd_elem_t *)&dioq->head;450450- dioq->tail = (crystalhd_elem_t *)&dioq->head;449449+ dioq->head = (struct crystalhd_elem *)&dioq->head;450450+ dioq->tail = (struct crystalhd_elem *)&dioq->head;451451 crystalhd_create_event(&dioq->event);452452 dioq->adp = adp;453453 dioq->data_rel_cb = cb;···470470 * by calling the call back provided during creation.471471 *472472 */473473-void crystalhd_delete_dioq(struct crystalhd_adp *adp, crystalhd_dioq_t *dioq)473473+void crystalhd_delete_dioq(struct crystalhd_adp *adp, struct crystalhd_dioq *dioq)474474{475475 void *temp;476476···498498 *499499 * Insert new element to Q tail.500500 */501501-BC_STATUS crystalhd_dioq_add(crystalhd_dioq_t *ioq, void *data,501501+enum BC_STATUS crystalhd_dioq_add(struct crystalhd_dioq *ioq, void *data,502502 bool wake, uint32_t tag)503503{504504 unsigned long flags = 0;505505- crystalhd_elem_t *tmp;505505+ struct crystalhd_elem *tmp;506506507507 if (!ioq || (ioq->sig != BC_LINK_DIOQ_SIG) || !data) {508508 BCMLOG_ERR("Invalid arg!!\n");···518518 tmp->data = data;519519 tmp->tag = tag;520520 spin_lock_irqsave(&ioq->lock, flags);521521- tmp->flink = (crystalhd_elem_t *)&ioq->head;521521+ tmp->flink = (struct crystalhd_elem *)&ioq->head;522522 tmp->blink = ioq->tail;523523 tmp->flink->blink = tmp;524524 tmp->blink->flink = tmp;···540540 *541541 * Remove an element from Queue.542542 */543543-void *crystalhd_dioq_fetch(crystalhd_dioq_t *ioq)543543+void *crystalhd_dioq_fetch(struct crystalhd_dioq *ioq)544544{545545 unsigned long flags = 0;546546- crystalhd_elem_t *tmp;547547- crystalhd_elem_t *ret = NULL;546546+ struct crystalhd_elem *tmp;547547+ struct crystalhd_elem *ret = NULL;548548 void *data = NULL;549549550550 if (!ioq || (ioq->sig != BC_LINK_DIOQ_SIG)) {···554554555555 spin_lock_irqsave(&ioq->lock, flags);556556 tmp = ioq->head;557557- if (tmp != (crystalhd_elem_t *)&ioq->head) {557557+ if (tmp != (struct crystalhd_elem *)&ioq->head) {558558 ret = tmp;559559 tmp->flink->blink = tmp->blink;560560 tmp->blink->flink = tmp->flink;···578578 *579579 * Search TAG and remove the element.580580 */581581-void *crystalhd_dioq_find_and_fetch(crystalhd_dioq_t *ioq, uint32_t tag)581581+void *crystalhd_dioq_find_and_fetch(struct crystalhd_dioq *ioq, uint32_t tag)582582{583583 unsigned long flags = 0;584584- crystalhd_elem_t *tmp;585585- crystalhd_elem_t *ret = NULL;584584+ struct crystalhd_elem *tmp;585585+ struct crystalhd_elem *ret = NULL;586586 void *data = NULL;587587588588 if (!ioq || (ioq->sig != BC_LINK_DIOQ_SIG)) {···592592593593 spin_lock_irqsave(&ioq->lock, flags);594594 tmp = ioq->head;595595- while (tmp != (crystalhd_elem_t *)&ioq->head) {595595+ while (tmp != (struct crystalhd_elem *)&ioq->head) {596596 if (tmp->tag == tag) {597597 ret = tmp;598598 tmp->flink->blink = tmp->blink;···623623 * Return element from head if Q is not empty. Wait for new element624624 * if Q is empty for Timeout seconds.625625 */626626-void *crystalhd_dioq_fetch_wait(crystalhd_dioq_t *ioq, uint32_t to_secs,626626+void *crystalhd_dioq_fetch_wait(struct crystalhd_dioq *ioq, uint32_t to_secs,627627 uint32_t *sig_pend)628628{629629 unsigned long flags = 0;···673673 * This routine maps user address and lock pages for DMA.674674 *675675 */676676-BC_STATUS crystalhd_map_dio(struct crystalhd_adp *adp, void *ubuff,676676+enum BC_STATUS crystalhd_map_dio(struct crystalhd_adp *adp, void *ubuff,677677 uint32_t ubuff_sz, uint32_t uv_offset,678678 bool en_422mode, bool dir_tx,679679- crystalhd_dio_req **dio_hnd)679679+ struct crystalhd_dio_req **dio_hnd)680680{681681- crystalhd_dio_req *dio;681681+ struct crystalhd_dio_req *dio;682682 /* FIXME: jarod: should some of these unsigned longs be uint32_t or uintptr_t? */683683 unsigned long start = 0, end = 0, uaddr = 0, count = 0;684684 unsigned long spsz = 0, uv_start = 0;···820820 *821821 * This routine is to unmap the user buffer pages.822822 */823823-BC_STATUS crystalhd_unmap_dio(struct crystalhd_adp *adp, crystalhd_dio_req *dio)823823+enum BC_STATUS crystalhd_unmap_dio(struct crystalhd_adp *adp, struct crystalhd_dio_req *dio)824824{825825 struct page *page = NULL;826826 int j = 0;···864864{865865 uint32_t asz = 0, i = 0;866866 uint8_t *temp;867867- crystalhd_dio_req *dio;867867+ struct crystalhd_dio_req *dio;868868869869 if (!adp || !max_pages) {870870 BCMLOG_ERR("Invalid Arg!!\n");···893893 return -ENOMEM;894894 }895895896896- dio = (crystalhd_dio_req *)temp;896896+ dio = (struct crystalhd_dio_req *)temp;897897 temp += sizeof(*dio);898898 dio->pages = (struct page **)temp;899899 temp += (sizeof(*dio->pages) * max_pages);···923923 */924924void crystalhd_destroy_dio_pool(struct crystalhd_adp *adp)925925{926926- crystalhd_dio_req *dio;926926+ struct crystalhd_dio_req *dio;927927 int count = 0;928928929929 if (!adp) {···965965 uint32_t pool_size)966966{967967 uint32_t i;968968- crystalhd_elem_t *temp;968968+ struct crystalhd_elem *temp;969969970970 if (!adp || !pool_size)971971 return -EINVAL;···993993 */994994void crystalhd_delete_elem_pool(struct crystalhd_adp *adp)995995{996996- crystalhd_elem_t *temp;996996+ struct crystalhd_elem *temp;997997 int dbg_cnt = 0;998998999999 if (!adp)