diff options
author | Johannes Berg <johannes.berg@intel.com> | 2015-06-10 12:44:58 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2015-06-10 12:45:09 +0200 |
commit | 206c59d1d7d42bcafc1d7f1e476e87e4427e2345 (patch) | |
tree | a2f99470bd0fe43f5cf57812fca969bb3ca3c451 /drivers/tty/serial/of_serial.c | |
parent | mac80211: Fix a case of incorrect metric used when forwarding a PREQ (diff) | |
parent | Merge tag 'batman-adv-for-davem' of git://git.open-mesh.org/linux-merge (diff) | |
download | linux-206c59d1d7d42bcafc1d7f1e476e87e4427e2345.tar.xz linux-206c59d1d7d42bcafc1d7f1e476e87e4427e2345.zip |
Merge remote-tracking branch 'net-next/master' into mac80211-next
Merge back net-next to get wireless driver changes (from Kalle)
to be able to create the API change across all trees properly.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/tty/serial/of_serial.c')
-rw-r--r-- | drivers/tty/serial/of_serial.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/tty/serial/of_serial.c b/drivers/tty/serial/of_serial.c index 33fb94f78967..137381e649e5 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, spin_lock_init(&port->lock); port->mapbase = resource.start; + port->mapsize = resource_size(&resource); /* Check for shifted address mapping */ if (of_property_read_u32(np, "reg-offset", &prop) == 0) @@ -115,7 +116,8 @@ static int of_platform_serial_setup(struct platform_device *ofdev, port->iotype = UPIO_MEM; break; case 4: - port->iotype = UPIO_MEM32; + port->iotype = of_device_is_big_endian(np) ? + UPIO_MEM32BE : UPIO_MEM32; break; default: dev_warn(&ofdev->dev, "unsupported reg-io-width (%d)\n", @@ -155,7 +157,7 @@ out: /* * Try to register a serial port */ -static struct of_device_id of_platform_serial_table[]; +static const struct of_device_id of_platform_serial_table[]; static int of_platform_serial_probe(struct platform_device *ofdev) { const struct of_device_id *match; @@ -320,7 +322,7 @@ static SIMPLE_DEV_PM_OPS(of_serial_pm_ops, of_serial_suspend, of_serial_resume); /* * A few common types, add more as needed. */ -static struct of_device_id of_platform_serial_table[] = { +static const struct of_device_id of_platform_serial_table[] = { { .compatible = "ns8250", .data = (void *)PORT_8250, }, { .compatible = "ns16450", .data = (void *)PORT_16450, }, { .compatible = "ns16550a", .data = (void *)PORT_16550A, }, @@ -344,7 +346,6 @@ static struct of_device_id of_platform_serial_table[] = { { .compatible = "ibm,qpace-nwp-serial", .data = (void *)PORT_NWPSERIAL, }, #endif - { .type = "serial", .data = (void *)PORT_UNKNOWN, }, { /* end of list */ }, }; |