aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/of_serial.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty/serial/of_serial.c')
-rw-r--r--drivers/tty/serial/of_serial.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/tty/serial/of_serial.c b/drivers/tty/serial/of_serial.c
index 33fb94f78967..aa00154c4a6d 100644
--- a/drivers/tty/serial/of_serial.c
+++ b/drivers/tty/serial/of_serial.c
@@ -89,6 +89,7 @@ static int of_platform_serial_setup(struct platform_device *ofdev,
89 89
90 spin_lock_init(&port->lock); 90 spin_lock_init(&port->lock);
91 port->mapbase = resource.start; 91 port->mapbase = resource.start;
92 port->mapsize = resource_size(&resource);
92 93
93 /* Check for shifted address mapping */ 94 /* Check for shifted address mapping */
94 if (of_property_read_u32(np, "reg-offset", &prop) == 0) 95 if (of_property_read_u32(np, "reg-offset", &prop) == 0)
@@ -155,7 +156,7 @@ out:
155/* 156/*
156 * Try to register a serial port 157 * Try to register a serial port
157 */ 158 */
158static struct of_device_id of_platform_serial_table[]; 159static const struct of_device_id of_platform_serial_table[];
159static int of_platform_serial_probe(struct platform_device *ofdev) 160static int of_platform_serial_probe(struct platform_device *ofdev)
160{ 161{
161 const struct of_device_id *match; 162 const struct of_device_id *match;
@@ -320,7 +321,7 @@ static SIMPLE_DEV_PM_OPS(of_serial_pm_ops, of_serial_suspend, of_serial_resume);
320/* 321/*
321 * A few common types, add more as needed. 322 * A few common types, add more as needed.
322 */ 323 */
323static struct of_device_id of_platform_serial_table[] = { 324static const struct of_device_id of_platform_serial_table[] = {
324 { .compatible = "ns8250", .data = (void *)PORT_8250, }, 325 { .compatible = "ns8250", .data = (void *)PORT_8250, },
325 { .compatible = "ns16450", .data = (void *)PORT_16450, }, 326 { .compatible = "ns16450", .data = (void *)PORT_16450, },
326 { .compatible = "ns16550a", .data = (void *)PORT_16550A, }, 327 { .compatible = "ns16550a", .data = (void *)PORT_16550A, },