From b8ecec8952a7a87373f5f700757d1fed66263c82 Mon Sep 17 00:00:00 2001 From: jan Date: Wed, 1 Sep 2021 09:29:31 +0000 Subject: [PATCH] Remove dead poweroff functions, as they not appear in other serial drivers. ok patrick@ --- sys/dev/fdt/exuart.c | 14 +------------- sys/dev/fdt/imxuart.c | 14 +------------- sys/dev/ic/pluart.c | 14 +------------- 3 files changed, 3 insertions(+), 39 deletions(-) diff --git a/sys/dev/fdt/exuart.c b/sys/dev/fdt/exuart.c index c04279c6d52..d7ee9757a32 100644 --- a/sys/dev/fdt/exuart.c +++ b/sys/dev/fdt/exuart.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exuart.c,v 1.8 2021/02/22 18:32:02 kettenis Exp $ */ +/* $OpenBSD: exuart.c,v 1.9 2021/09/01 09:29:31 jan Exp $ */ /* * Copyright (c) 2005 Dale Rahn * @@ -106,7 +106,6 @@ void exuartcnputc(dev_t dev, int c); void exuartcnpollc(dev_t dev, int on); int exuart_param(struct tty *tp, struct termios *t); void exuart_start(struct tty *); -void exuart_pwroff(struct exuart_softc *sc); void exuart_diag(void *arg); void exuart_raisedtr(void *arg); void exuart_softint(void *arg); @@ -557,11 +556,6 @@ stopped: splx(s); } -void -exuart_pwroff(struct exuart_softc *sc) -{ -} - void exuart_diag(void *arg) { @@ -797,9 +791,6 @@ exuartopen(dev_t dev, int flag, int mode, struct proc *p) */ if (error && ISSET(tp->t_state, TS_WOPEN)) { CLR(tp->t_state, TS_WOPEN); - if (!sc->sc_cua && !ISSET(tp->t_state, - TS_ISOPEN)) - exuart_pwroff(sc); splx(s); return error; } @@ -832,9 +823,6 @@ exuartclose(dev_t dev, int flag, int mode, struct proc *p) //CLR(sc->sc_ucr3, EXUART_CR3_DSR); //bus_space_write_2(iot, ioh, EXUART_UCR3, sc->sc_ucr3); timeout_add_sec(&sc->sc_dtr_tmo, 2); - } else { - /* no one else waiting; turn off the uart */ - exuart_pwroff(sc); } CLR(tp->t_state, TS_BUSY | TS_FLUSH); sc->sc_cua = 0; diff --git a/sys/dev/fdt/imxuart.c b/sys/dev/fdt/imxuart.c index 1cec08ef5fa..20b49205ca7 100644 --- a/sys/dev/fdt/imxuart.c +++ b/sys/dev/fdt/imxuart.c @@ -1,4 +1,4 @@ -/* $OpenBSD: imxuart.c,v 1.10 2021/08/31 12:24:15 jan Exp $ */ +/* $OpenBSD: imxuart.c,v 1.11 2021/09/01 09:29:31 jan Exp $ */ /* * Copyright (c) 2005 Dale Rahn * @@ -98,7 +98,6 @@ void imxuartcnputc(dev_t dev, int c); void imxuartcnpollc(dev_t dev, int on); int imxuart_param(struct tty *tp, struct termios *t); void imxuart_start(struct tty *); -void imxuart_pwroff(struct imxuart_softc *sc); void imxuart_diag(void *arg); void imxuart_raisedtr(void *arg); void imxuart_softint(void *arg); @@ -388,11 +387,6 @@ stopped: splx(s); } -void -imxuart_pwroff(struct imxuart_softc *sc) -{ -} - void imxuart_diag(void *arg) { @@ -606,9 +600,6 @@ imxuartopen(dev_t dev, int flag, int mode, struct proc *p) */ if (error && ISSET(tp->t_state, TS_WOPEN)) { CLR(tp->t_state, TS_WOPEN); - if (!sc->sc_cua && !ISSET(tp->t_state, - TS_ISOPEN)) - imxuart_pwroff(sc); splx(s); return error; } @@ -640,9 +631,6 @@ imxuartclose(dev_t dev, int flag, int mode, struct proc *p) CLR(sc->sc_ucr3, IMXUART_CR3_DSR); bus_space_write_2(iot, ioh, IMXUART_UCR3, sc->sc_ucr3); timeout_add_sec(&sc->sc_dtr_tmo, 2); - } else { - /* no one else waiting; turn off the uart */ - imxuart_pwroff(sc); } CLR(tp->t_state, TS_BUSY | TS_FLUSH); diff --git a/sys/dev/ic/pluart.c b/sys/dev/ic/pluart.c index b272c0bb093..eaa11b6c44b 100644 --- a/sys/dev/ic/pluart.c +++ b/sys/dev/ic/pluart.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pluart.c,v 1.6 2021/08/31 12:24:15 jan Exp $ */ +/* $OpenBSD: pluart.c,v 1.7 2021/09/01 09:29:31 jan Exp $ */ /* * Copyright (c) 2014 Patrick Wildt * Copyright (c) 2005 Dale Rahn @@ -124,7 +124,6 @@ void pluartcnputc(dev_t dev, int c); void pluartcnpollc(dev_t dev, int on); int pluart_param(struct tty *tp, struct termios *t); void pluart_start(struct tty *); -void pluart_pwroff(struct pluart_softc *sc); void pluart_diag(void *arg); void pluart_raisedtr(void *arg); void pluart_softint(void *arg); @@ -346,11 +345,6 @@ out: splx(s); } -void -pluart_pwroff(struct pluart_softc *sc) -{ -} - void pluart_diag(void *arg) { @@ -572,9 +566,6 @@ pluartopen(dev_t dev, int flag, int mode, struct proc *p) */ if (error && ISSET(tp->t_state, TS_WOPEN)) { CLR(tp->t_state, TS_WOPEN); - if (!sc->sc_cua && !ISSET(tp->t_state, - TS_ISOPEN)) - pluart_pwroff(sc); splx(s); return error; } @@ -606,9 +597,6 @@ pluartclose(dev_t dev, int flag, int mode, struct proc *p) //CLR(sc->sc_ucr3, IMXUART_CR3_DSR); //bus_space_write_4(iot, ioh, IMXUART_UCR3, sc->sc_ucr3); timeout_add_sec(&sc->sc_dtr_tmo, 2); - } else { - /* no one else waiting; turn off the uart */ - pluart_pwroff(sc); } CLR(tp->t_state, TS_BUSY | TS_FLUSH); -- 2.20.1