Remove dead poweroff functions, as they not appear in other
authorjan <jan@openbsd.org>
Wed, 1 Sep 2021 09:29:31 +0000 (09:29 +0000)
committerjan <jan@openbsd.org>
Wed, 1 Sep 2021 09:29:31 +0000 (09:29 +0000)
serial drivers.

ok patrick@

sys/dev/fdt/exuart.c
sys/dev/fdt/imxuart.c
sys/dev/ic/pluart.c

index c04279c..d7ee975 100644 (file)
@@ -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 <drahn@motorola.com>
  *
@@ -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;
index 1cec08e..20b4920 100644 (file)
@@ -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 <drahn@motorola.com>
  *
@@ -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);
 
index b272c0b..eaa11b6 100644 (file)
@@ -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 <patrick@blueri.se>
  * Copyright (c) 2005 Dale Rahn <drahn@dalerahn.com>
@@ -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);