Commit 5d8508aa authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Revert "serial-uartlite: Do not use static struct uart_driver out of probe()"

This reverts commit 3b209d25.

As Johan says, this driver needs a lot more work and these changes are
only going in the wrong direction:
    https://lkml.kernel.org/r/20190523091839.GC568@localhostReported-by: default avatarJohan Hovold <johan@kernel.org>
Cc: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 07e5d4ff
...@@ -63,7 +63,6 @@ static struct uart_port *console_port; ...@@ -63,7 +63,6 @@ static struct uart_port *console_port;
struct uartlite_data { struct uartlite_data {
const struct uartlite_reg_ops *reg_ops; const struct uartlite_reg_ops *reg_ops;
struct clk *clk; struct clk *clk;
struct uart_driver *ulite_uart_driver;
}; };
struct uartlite_reg_ops { struct uartlite_reg_ops {
...@@ -695,9 +694,7 @@ static int ulite_release(struct device *dev) ...@@ -695,9 +694,7 @@ static int ulite_release(struct device *dev)
int rc = 0; int rc = 0;
if (port) { if (port) {
struct uartlite_data *pdata = port->private_data; rc = uart_remove_one_port(&ulite_uart_driver, port);
rc = uart_remove_one_port(pdata->ulite_uart_driver, port);
dev_set_drvdata(dev, NULL); dev_set_drvdata(dev, NULL);
port->mapbase = 0; port->mapbase = 0;
} }
...@@ -715,11 +712,8 @@ static int __maybe_unused ulite_suspend(struct device *dev) ...@@ -715,11 +712,8 @@ static int __maybe_unused ulite_suspend(struct device *dev)
{ {
struct uart_port *port = dev_get_drvdata(dev); struct uart_port *port = dev_get_drvdata(dev);
if (port) { if (port)
struct uartlite_data *pdata = port->private_data; uart_suspend_port(&ulite_uart_driver, port);
uart_suspend_port(pdata->ulite_uart_driver, port);
}
return 0; return 0;
} }
...@@ -734,11 +728,8 @@ static int __maybe_unused ulite_resume(struct device *dev) ...@@ -734,11 +728,8 @@ static int __maybe_unused ulite_resume(struct device *dev)
{ {
struct uart_port *port = dev_get_drvdata(dev); struct uart_port *port = dev_get_drvdata(dev);
if (port) { if (port)
struct uartlite_data *pdata = port->private_data; uart_resume_port(&ulite_uart_driver, port);
uart_resume_port(pdata->ulite_uart_driver, port);
}
return 0; return 0;
} }
...@@ -813,7 +804,6 @@ static int ulite_probe(struct platform_device *pdev) ...@@ -813,7 +804,6 @@ static int ulite_probe(struct platform_device *pdev)
pdata->clk = NULL; pdata->clk = NULL;
} }
pdata->ulite_uart_driver = &ulite_uart_driver;
ret = clk_prepare_enable(pdata->clk); ret = clk_prepare_enable(pdata->clk);
if (ret) { if (ret) {
dev_err(&pdev->dev, "Failed to prepare clock\n"); dev_err(&pdev->dev, "Failed to prepare clock\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment