aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/8250/8250_dw.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty/serial/8250/8250_dw.c')
-rw-r--r--drivers/tty/serial/8250/8250_dw.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c
index daf710f5c3fc..d7a405b12600 100644
--- a/drivers/tty/serial/8250/8250_dw.c
+++ b/drivers/tty/serial/8250/8250_dw.c
@@ -56,11 +56,12 @@
56 56
57 57
58struct dw8250_data { 58struct dw8250_data {
59 int last_lcr; 59 u8 usr_reg;
60 int last_mcr; 60 int last_lcr;
61 int line; 61 int last_mcr;
62 struct clk *clk; 62 int line;
63 u8 usr_reg; 63 struct clk *clk;
64 struct uart_8250_dma dma;
64}; 65};
65 66
66static inline int dw8250_modify_msr(struct uart_port *p, int offset, int value) 67static inline int dw8250_modify_msr(struct uart_port *p, int offset, int value)
@@ -241,7 +242,8 @@ static int dw8250_probe_of(struct uart_port *p,
241} 242}
242 243
243#ifdef CONFIG_ACPI 244#ifdef CONFIG_ACPI
244static int dw8250_probe_acpi(struct uart_8250_port *up) 245static int dw8250_probe_acpi(struct uart_8250_port *up,
246 struct dw8250_data *data)
245{ 247{
246 const struct acpi_device_id *id; 248 const struct acpi_device_id *id;
247 struct uart_port *p = &up->port; 249 struct uart_port *p = &up->port;
@@ -260,9 +262,7 @@ static int dw8250_probe_acpi(struct uart_8250_port *up)
260 if (!p->uartclk) 262 if (!p->uartclk)
261 p->uartclk = (unsigned int)id->driver_data; 263 p->uartclk = (unsigned int)id->driver_data;
262 264
263 up->dma = devm_kzalloc(p->dev, sizeof(*up->dma), GFP_KERNEL); 265 up->dma = &data->dma;
264 if (!up->dma)
265 return -ENOMEM;
266 266
267 up->dma->rxconf.src_maxburst = p->fifosize / 4; 267 up->dma->rxconf.src_maxburst = p->fifosize / 4;
268 up->dma->txconf.dst_maxburst = p->fifosize / 4; 268 up->dma->txconf.dst_maxburst = p->fifosize / 4;
@@ -324,7 +324,7 @@ static int dw8250_probe(struct platform_device *pdev)
324 if (err) 324 if (err)
325 return err; 325 return err;
326 } else if (ACPI_HANDLE(&pdev->dev)) { 326 } else if (ACPI_HANDLE(&pdev->dev)) {
327 err = dw8250_probe_acpi(&uart); 327 err = dw8250_probe_acpi(&uart, data);
328 if (err) 328 if (err)
329 return err; 329 return err;
330 } else { 330 } else {