Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/imx Move intr_establish() before imxuart_attach...



details:   https://anonhg.NetBSD.org/src/rev/dc22130a5342
branches:  trunk
changeset: 362670:dc22130a5342
user:      hkenken <hkenken%NetBSD.org@localhost>
date:      Wed Jun 20 07:08:35 2018 +0000

description:
Move intr_establish() before imxuart_attach_subr().

diffstat:

 sys/arch/arm/imx/imxuart.c |  16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diffs (44 lines):

diff -r 644e7cafe240 -r dc22130a5342 sys/arch/arm/imx/imxuart.c
--- a/sys/arch/arm/imx/imxuart.c        Wed Jun 20 07:05:37 2018 +0000
+++ b/sys/arch/arm/imx/imxuart.c        Wed Jun 20 07:08:35 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: imxuart.c,v 1.20 2017/09/08 05:29:12 hkenken Exp $ */
+/* $NetBSD: imxuart.c,v 1.21 2018/06/20 07:08:35 hkenken Exp $ */
 
 /*
  * Copyright (c) 2009, 2010  Genetec Corporation.  All rights reserved.
@@ -96,7 +96,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: imxuart.c,v 1.20 2017/09/08 05:29:12 hkenken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: imxuart.c,v 1.21 2018/06/20 07:08:35 hkenken Exp $");
 
 #include "opt_imxuart.h"
 #include "opt_ddb.h"
@@ -306,6 +306,13 @@
        }
        regsp->ur_ioh = ioh;
 
+       sc->sc_ih = intr_establish(sc->sc_intr, IPL_SERIAL, IST_LEVEL,
+           imxuintr, sc);
+       if (sc->sc_ih == NULL) {
+               aprint_error_dev(sc->sc_dev, "intr_establish failed\n");
+               return;
+       }
+
        imxuart_attach_subr(sc);
 }
 
@@ -377,11 +384,6 @@
                }
        }
 
-       sc->sc_ih = intr_establish(sc->sc_intr, IPL_SERIAL, IST_LEVEL,
-           imxuintr, sc);
-       if (sc->sc_ih == NULL)
-               aprint_error_dev(sc->sc_dev, "intr_establish failed\n");
-
 #ifdef KGDB
        /*
         * Allow kgdb to "take over" this port.  If this is



Home | Main Index | Thread Index | Old Index