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>
This commit is contained in:
Vikram Pandita 2013-07-08 10:25:43 +03:00 коммит произвёл Greg Kroah-Hartman
Родитель 76bac1987c
Коммит a0a490f9df
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -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) {