aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorDawei Li <set_pte_at@outlook.com>2023-02-01 22:36:19 +0800
committerMichael Ellerman <mpe@ellerman.id.au>2024-03-07 23:06:19 +1100
commit9db2235326c4b868b6e065dfa3a69011ee570848 (patch)
tree3f338282365ae6aeb5045577a5d333a8ff1ac428 /drivers/tty
parentc2e5d70cf05b48bfbd5b6625bbd0ec3052cecd5d (diff)
downloadlinux-9db2235326c4b868b6e065dfa3a69011ee570848.tar.gz
powerpc/macio: Make remove callback of macio driver void returned
Commit fc7a6209d571 ("bus: Make remove callback return void") forces bus_type::remove be void-returned, it doesn't make much sense for any bus based driver implementing remove callbalk to return non-void to its caller. This change is for macio bus based drivers. Signed-off-by: Dawei Li <set_pte_at@outlook.com> Acked-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> Acked-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/TYCP286MB232391520CB471E7C8D6EA84CAD19@TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/pmac_zilog.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/tty/serial/pmac_zilog.c b/drivers/tty/serial/pmac_zilog.c
index c8bf08c19c647..732d821db4f80 100644
--- a/drivers/tty/serial/pmac_zilog.c
+++ b/drivers/tty/serial/pmac_zilog.c
@@ -1507,12 +1507,12 @@ static int pmz_attach(struct macio_dev *mdev, const struct of_device_id *match)
* That one should not be called, macio isn't really a hotswap device,
* we don't expect one of those serial ports to go away...
*/
-static int pmz_detach(struct macio_dev *mdev)
+static void pmz_detach(struct macio_dev *mdev)
{
struct uart_pmac_port *uap = dev_get_drvdata(&mdev->ofdev.dev);
if (!uap)
- return -ENODEV;
+ return;
uart_remove_one_port(&pmz_uart_reg, &uap->port);
@@ -1523,11 +1523,8 @@ static int pmz_detach(struct macio_dev *mdev)
dev_set_drvdata(&mdev->ofdev.dev, NULL);
uap->dev = NULL;
uap->port.dev = NULL;
-
- return 0;
}
-
static int pmz_suspend(struct macio_dev *mdev, pm_message_t pm_state)
{
struct uart_pmac_port *uap = dev_get_drvdata(&mdev->ofdev.dev);