diff options
Diffstat (limited to 'drivers/tty/serial/8250/8250_dw.c')
-rw-r--r-- | drivers/tty/serial/8250/8250_dw.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c index f574eef3075f..c3b2ec0c8c0b 100644 --- a/drivers/tty/serial/8250/8250_dw.c +++ b/drivers/tty/serial/8250/8250_dw.c | |||
@@ -89,7 +89,7 @@ static int dw8250_handle_irq(struct uart_port *p) | |||
89 | 89 | ||
90 | static int __devinit dw8250_probe(struct platform_device *pdev) | 90 | static int __devinit dw8250_probe(struct platform_device *pdev) |
91 | { | 91 | { |
92 | struct uart_port port = {}; | 92 | struct uart_8250_port uart = {}; |
93 | struct resource *regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 93 | struct resource *regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
94 | struct resource *irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0); | 94 | struct resource *irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0); |
95 | struct device_node *np = pdev->dev.of_node; | 95 | struct device_node *np = pdev->dev.of_node; |
@@ -104,28 +104,28 @@ static int __devinit dw8250_probe(struct platform_device *pdev) | |||
104 | data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL); | 104 | data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL); |
105 | if (!data) | 105 | if (!data) |
106 | return -ENOMEM; | 106 | return -ENOMEM; |
107 | port.private_data = data; | 107 | uart.port.private_data = data; |
108 | 108 | ||
109 | spin_lock_init(&port.lock); | 109 | spin_lock_init(&uart.port.lock); |
110 | port.mapbase = regs->start; | 110 | uart.port.mapbase = regs->start; |
111 | port.irq = irq->start; | 111 | uart.port.irq = irq->start; |
112 | port.handle_irq = dw8250_handle_irq; | 112 | uart.port.handle_irq = dw8250_handle_irq; |
113 | port.type = PORT_8250; | 113 | uart.port.type = PORT_8250; |
114 | port.flags = UPF_SHARE_IRQ | UPF_BOOT_AUTOCONF | UPF_IOREMAP | | 114 | uart.port.flags = UPF_SHARE_IRQ | UPF_BOOT_AUTOCONF | UPF_IOREMAP | |
115 | UPF_FIXED_PORT | UPF_FIXED_TYPE; | 115 | UPF_FIXED_PORT | UPF_FIXED_TYPE; |
116 | port.dev = &pdev->dev; | 116 | uart.port.dev = &pdev->dev; |
117 | 117 | ||
118 | port.iotype = UPIO_MEM; | 118 | uart.port.iotype = UPIO_MEM; |
119 | port.serial_in = dw8250_serial_in; | 119 | uart.port.serial_in = dw8250_serial_in; |
120 | port.serial_out = dw8250_serial_out; | 120 | uart.port.serial_out = dw8250_serial_out; |
121 | if (!of_property_read_u32(np, "reg-io-width", &val)) { | 121 | if (!of_property_read_u32(np, "reg-io-width", &val)) { |
122 | switch (val) { | 122 | switch (val) { |
123 | case 1: | 123 | case 1: |
124 | break; | 124 | break; |
125 | case 4: | 125 | case 4: |
126 | port.iotype = UPIO_MEM32; | 126 | uart.port.iotype = UPIO_MEM32; |
127 | port.serial_in = dw8250_serial_in32; | 127 | uart.port.serial_in = dw8250_serial_in32; |
128 | port.serial_out = dw8250_serial_out32; | 128 | uart.port.serial_out = dw8250_serial_out32; |
129 | break; | 129 | break; |
130 | default: | 130 | default: |
131 | dev_err(&pdev->dev, "unsupported reg-io-width (%u)\n", | 131 | dev_err(&pdev->dev, "unsupported reg-io-width (%u)\n", |
@@ -135,15 +135,15 @@ static int __devinit dw8250_probe(struct platform_device *pdev) | |||
135 | } | 135 | } |
136 | 136 | ||
137 | if (!of_property_read_u32(np, "reg-shift", &val)) | 137 | if (!of_property_read_u32(np, "reg-shift", &val)) |
138 | port.regshift = val; | 138 | uart.port.regshift = val; |
139 | 139 | ||
140 | if (of_property_read_u32(np, "clock-frequency", &val)) { | 140 | if (of_property_read_u32(np, "clock-frequency", &val)) { |
141 | dev_err(&pdev->dev, "no clock-frequency property set\n"); | 141 | dev_err(&pdev->dev, "no clock-frequency property set\n"); |
142 | return -EINVAL; | 142 | return -EINVAL; |
143 | } | 143 | } |
144 | port.uartclk = val; | 144 | uart.port.uartclk = val; |
145 | 145 | ||
146 | data->line = serial8250_register_port(&port); | 146 | data->line = serial8250_register_8250_port(&uart); |
147 | if (data->line < 0) | 147 | if (data->line < 0) |
148 | return data->line; | 148 | return data->line; |
149 | 149 | ||