Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 227074
b: refs/heads/master
c: 1c51899
h: refs/heads/master
v: v3
  • Loading branch information
Tomoya MORINAGA authored and Greg Kroah-Hartman committed Dec 16, 2010
1 parent 2ba4037 commit ea65067
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e4f05af136016958f52455da3070ca6622439b10
refs/heads/master: 1c5189976ffc130416e808f41049c12615a6380c
13 changes: 7 additions & 6 deletions trunk/drivers/serial/pch_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,8 @@ static int dma_handle_rx(struct eg20t_port *priv)
sg_dma_len(sg) = priv->fifo_size;

sg_set_page(&priv->sg_rx, virt_to_page(priv->rx_buf_virt),
sg_dma_len(sg), (int)priv->rx_buf_virt & ~PAGE_MASK);
sg_dma_len(sg), (unsigned long)priv->rx_buf_virt &
~PAGE_MASK);

sg_dma_address(sg) = priv->rx_buf_dma;

Expand Down Expand Up @@ -1254,15 +1255,15 @@ static struct eg20t_port *pch_uart_init_port(struct pci_dev *pdev,
int ret;
unsigned int iobase;
unsigned int mapbase;
unsigned int rxbuf;
unsigned char *rxbuf;
int fifosize, base_baud;
static int num;

priv = kzalloc(sizeof(struct eg20t_port), GFP_KERNEL);
if (priv == NULL)
goto init_port_alloc_err;

rxbuf = __get_free_page(GFP_KERNEL);
rxbuf = (unsigned char *)__get_free_page(GFP_KERNEL);
if (!rxbuf)
goto init_port_free_txbuf;

Expand All @@ -1286,7 +1287,7 @@ static struct eg20t_port *pch_uart_init_port(struct pci_dev *pdev,
priv->iobase = iobase;
priv->pdev = pdev;
priv->tx_empty = 1;
priv->rxbuf.buf = (unsigned char *)rxbuf;
priv->rxbuf.buf = rxbuf;
priv->rxbuf.size = PAGE_SIZE;

priv->fifo_size = fifosize;
Expand All @@ -1313,7 +1314,7 @@ static struct eg20t_port *pch_uart_init_port(struct pci_dev *pdev,
return priv;

init_port_hal_free:
free_page(rxbuf);
free_page((unsigned long)rxbuf);
init_port_free_txbuf:
kfree(priv);
init_port_alloc_err:
Expand All @@ -1325,7 +1326,7 @@ static void pch_uart_exit_port(struct eg20t_port *priv)
{
uart_remove_one_port(&pch_uart_driver, &priv->port);
pci_set_drvdata(priv->pdev, NULL);
free_page((unsigned int)priv->rxbuf.buf);
free_page((unsigned long)priv->rxbuf.buf);
}

static void pch_uart_pci_remove(struct pci_dev *pdev)
Expand Down

0 comments on commit ea65067

Please sign in to comment.