X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fserial%2Fcpm_uart%2Fcpm_uart_cpm2.c;h=0c12f28e0e39ba78d55e10a25abc358b4cbf1c06;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=d2566889d8cbdcadf269734e8c761b142ed3fec9;hpb=5fc42a6ed0ec81088c37caadb45898ae6cd0ad2c;p=linux-2.6.git diff --git a/drivers/serial/cpm_uart/cpm_uart_cpm2.c b/drivers/serial/cpm_uart/cpm_uart_cpm2.c index d2566889d..0c12f28e0 100644 --- a/drivers/serial/cpm_uart/cpm_uart_cpm2.c +++ b/drivers/serial/cpm_uart/cpm_uart_cpm2.c @@ -182,21 +182,21 @@ int cpm_uart_allocbuf(struct uart_cpm_port *pinfo, unsigned int is_con) { int dpmemsz, memsz; u8 *dp_mem; - uint dp_addr; + uint dp_offset; u8 *mem_addr; dma_addr_t dma_addr = 0; pr_debug("CPM uart[%d]:allocbuf\n", pinfo->port.line); dpmemsz = sizeof(cbd_t) * (pinfo->rx_nrfifos + pinfo->tx_nrfifos); - dp_mem = cpm2_dpalloc(dpmemsz, 8); - if (dp_mem == NULL) { + dp_offset = cpm_dpalloc(dpmemsz, 8); + if (IS_DPERR(dp_offset)) { printk(KERN_ERR - "cpm_uart_cpm1.c: could not allocate buffer descriptors\n"); + "cpm_uart_cpm.c: could not allocate buffer descriptors\n"); return -ENOMEM; } - dp_addr = cpm2_dpram_offset(dp_mem); + dp_mem = cpm_dpram_addr(dp_offset); memsz = L1_CACHE_ALIGN(pinfo->rx_nrfifos * pinfo->rx_fifosize) + L1_CACHE_ALIGN(pinfo->tx_nrfifos * pinfo->tx_fifosize); @@ -207,13 +207,13 @@ int cpm_uart_allocbuf(struct uart_cpm_port *pinfo, unsigned int is_con) GFP_KERNEL); if (mem_addr == NULL) { - cpm2_dpfree(dp_mem); + cpm_dpfree(dp_offset); printk(KERN_ERR - "cpm_uart_cpm1.c: could not allocate coherent memory\n"); + "cpm_uart_cpm.c: could not allocate coherent memory\n"); return -ENOMEM; } - pinfo->dp_addr = dp_addr; + pinfo->dp_addr = dp_offset; pinfo->mem_addr = mem_addr; pinfo->dma_addr = dma_addr; @@ -235,7 +235,7 @@ void cpm_uart_freebuf(struct uart_cpm_port *pinfo) pinfo->tx_fifosize), pinfo->mem_addr, pinfo->dma_addr); - cpm2_dpfree(&pinfo->dp_addr); + cpm_dpfree(pinfo->dp_addr); } /* Setup any dynamic params in the uart desc */