diff options
author | Andrey Smirnov <andrew.smirnov@gmail.com> | 2018-04-12 14:33:16 -0700 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2018-04-17 09:21:10 +0200 |
commit | 25cb29b1357d5005de3e149744a2ebee03a743bf (patch) | |
tree | db754edac03a4e761dc71fa95eff319117515a40 /drivers/serial/serial_s3c.c | |
parent | cebb36c9337691754a8d60d60da9731766cf19d2 (diff) | |
download | barebox-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_s3c.c')
-rw-r--r-- | drivers/serial/serial_s3c.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/drivers/serial/serial_s3c.c b/drivers/serial/serial_s3c.c index 0a6e22d971..1945560723 100644 --- a/drivers/serial/serial_s3c.c +++ b/drivers/serial/serial_s3c.c @@ -202,18 +202,8 @@ static int s3c_serial_probe(struct device_d *dev) return 0; } -static void s3c_serial_remove(struct device_d *dev) -{ - struct s3c_uart *priv= dev->priv; - - s3c_serial_flush(&priv->cdev); - console_unregister(&priv->cdev); - free(priv); -} - static struct driver_d s3c_serial_driver = { .name = "s3c_serial", .probe = s3c_serial_probe, - .remove = s3c_serial_remove, }; console_platform_driver(s3c_serial_driver); |