summaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/omap-serial.c
diff options
context:
space:
mode:
authorVikram Pandita <vikram.pandita@ti.com>2013-07-08 10:25:43 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-26 15:55:44 -0700
commita0a490f9df2bf7e077054c78221c6b5301681de6 (patch)
treedb4b94d731f785ae296312a3707cd81ab1954f9d /drivers/tty/serial/omap-serial.c
parent76bac1987ca181d54f8c9456d20997cb1020af2d (diff)
downloadop-kernel-dev-a0a490f9df2bf7e077054c78221c6b5301681de6.zip
op-kernel-dev-a0a490f9df2bf7e077054c78221c6b5301681de6.tar.gz
serial: omap: Initialize platform_data
Otherwise serial driver would crash accessing platform_data that was not initialized in functions like: serial_omap_pm(...) ... if (!state && pdata->enable_wakeup) ^^^^^^^ ... Signed-off-by: Vikram Pandita <vikram.pandita@ti.com> Signed-off-by: Alexander Savchenko <oleksandr.savchenko@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/omap-serial.c')
-rw-r--r--drivers/tty/serial/omap-serial.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
index 9b6fc54..72bb690 100644
--- a/drivers/tty/serial/omap-serial.c
+++ b/drivers/tty/serial/omap-serial.c
@@ -1414,8 +1414,10 @@ static int serial_omap_probe(struct platform_device *pdev)
struct omap_uart_port_info *omap_up_info = pdev->dev.platform_data;
int ret;
- if (pdev->dev.of_node)
+ if (pdev->dev.of_node) {
omap_up_info = of_get_uart_port_info(&pdev->dev);
+ pdev->dev.platform_data = omap_up_info;
+ }
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!mem) {
OpenPOWER on IntegriCloud