summaryrefslogtreecommitdiffstats
path: root/drivers/serial/serial_lpuart.c
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2018-04-12 14:33:16 -0700
committerSascha Hauer <s.hauer@pengutronix.de>2018-04-17 09:21:10 +0200
commit25cb29b1357d5005de3e149744a2ebee03a743bf (patch)
treedb754edac03a4e761dc71fa95eff319117515a40 /drivers/serial/serial_lpuart.c
parentcebb36c9337691754a8d60d60da9731766cf19d2 (diff)
downloadbarebox-25cb29b1357d5005de3e149744a2ebee03a743bf.tar.gz
barebox-25cb29b1357d5005de3e149744a2ebee03a743bf.tar.xz
serial: Drop .remove functions from all drivers
Depending on specifics, some 'serdev' devices might need prevent parent console device from being removed and corresponding memory deallocated to properly function until the very end of Barebox's execution. An example of such a use-case would be a reset handler relying on a serdev device for transport. To avoid having to develop complicatione reference counting/ownership scheme drop all of the code that calls console_unregister() and frees the memory effectively making the problem above impossible to arise. All of the de-initialization that serial drivers were doing in their .remove functions was somewhat superflous anyway, so this change should be pretty harmless. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/serial/serial_lpuart.c')
-rw-r--r--drivers/serial/serial_lpuart.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/drivers/serial/serial_lpuart.c b/drivers/serial/serial_lpuart.c
index 52fb6d39c0..09ae187ecc 100644
--- a/drivers/serial/serial_lpuart.c
+++ b/drivers/serial/serial_lpuart.c
@@ -191,18 +191,6 @@ err_free:
return ret;
}
-static void lpuart_serial_remove(struct device_d *dev)
-{
- struct lpuart *lpuart = dev->priv;
-
- lpuart_serial_flush(&lpuart->cdev);
- console_unregister(&lpuart->cdev);
- release_region(lpuart->io);
- clk_put(lpuart->clk);
-
- free(lpuart);
-}
-
static struct of_device_id lpuart_serial_dt_ids[] = {
{ .compatible = "fsl,vf610-lpuart" },
{}
@@ -211,7 +199,6 @@ static struct of_device_id lpuart_serial_dt_ids[] = {
static struct driver_d lpuart_serial_driver = {
.name = "lpuart-serial",
.probe = lpuart_serial_probe,
- .remove = lpuart_serial_remove,
.of_compatible = DRV_OF_COMPAT(lpuart_serial_dt_ids),
};
console_platform_driver(lpuart_serial_driver);