Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/evbarm/n900 Fixed the arguments order when calling ...



details:   https://anonhg.NetBSD.org/src/rev/b018ab10f3ba
branches:  trunk
changeset: 786168:b018ab10f3ba
user:      khorben <khorben%NetBSD.org@localhost>
date:      Thu Apr 18 02:08:11 2013 +0000

description:
Fixed the arguments order when calling intr_establish(): the interrupt
type and level were erroneously swapped.

diffstat:

 sys/arch/evbarm/n900/n900_acad.c   |  14 ++++++++------
 sys/arch/evbarm/n900/n900_lckbtn.c |   6 +++---
 2 files changed, 11 insertions(+), 9 deletions(-)

diffs (69 lines):

diff -r c08cca558205 -r b018ab10f3ba sys/arch/evbarm/n900/n900_acad.c
--- a/sys/arch/evbarm/n900/n900_acad.c  Thu Apr 18 01:33:18 2013 +0000
+++ b/sys/arch/evbarm/n900/n900_acad.c  Thu Apr 18 02:08:11 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: n900_acad.c,v 1.3 2013/04/17 01:10:28 khorben Exp $ */
+/*     $NetBSD: n900_acad.c,v 1.4 2013/04/18 02:08:11 khorben Exp $ */
 
 /*
  * AC adapter driver for the Nokia N900.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: n900_acad.c,v 1.3 2013/04/17 01:10:28 khorben Exp $");
+__KERNEL_RCSID(0, "$NetBSD: n900_acad.c,v 1.4 2013/04/18 02:08:11 khorben Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -127,8 +127,8 @@
        gpio_pin_ctl(sc->sc_gpio, &sc->sc_map, N900ACAD_PIN_INPUT,
                        GPIO_PIN_INPUT);
 
-       sc->sc_intr = intr_establish(N900ACAD_GPIO_BASE + ga->ga_offset,
-                       IST_EDGE_BOTH, IPL_VM, n900acad_intr, sc);
+       sc->sc_intr = intr_establish(N900ACAD_GPIO_BASE + ga->ga_offset, IPL_VM,
+                       IST_EDGE_RISING, n900acad_intr, sc);
        if (sc->sc_intr == NULL) {
                aprint_error(": could not establish interrupt\n");
                gpio_pin_unmap(sc->sc_gpio, &sc->sc_map);
@@ -178,8 +178,10 @@
 n900acad_refresh(struct n900acad_softc *sc)
 {
        int i;
+       int event;
 
        i = gpio_pin_read(sc->sc_gpio, &sc->sc_map, N900ACAD_PIN_INPUT);
-       sysmon_pswitch_event(&sc->sc_smpsw, (i == GPIO_PIN_HIGH)
-                       ? PSWITCH_EVENT_RELEASED : PSWITCH_EVENT_PRESSED);
+       event = (i == GPIO_PIN_HIGH)
+               ? PSWITCH_EVENT_RELEASED : PSWITCH_EVENT_PRESSED;
+       sysmon_pswitch_event(&sc->sc_smpsw, event);
 }
diff -r c08cca558205 -r b018ab10f3ba sys/arch/evbarm/n900/n900_lckbtn.c
--- a/sys/arch/evbarm/n900/n900_lckbtn.c        Thu Apr 18 01:33:18 2013 +0000
+++ b/sys/arch/evbarm/n900/n900_lckbtn.c        Thu Apr 18 02:08:11 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: n900_lckbtn.c,v 1.1 2013/04/17 01:06:14 khorben Exp $ */
+/*     $NetBSD: n900_lckbtn.c,v 1.2 2013/04/18 02:08:11 khorben Exp $ */
 
 /*
  * Lock button driver for the Nokia N900.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: n900_lckbtn.c,v 1.1 2013/04/17 01:06:14 khorben Exp $");
+__KERNEL_RCSID(0, "$NetBSD: n900_lckbtn.c,v 1.2 2013/04/18 02:08:11 khorben Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -129,7 +129,7 @@
                        GPIO_PIN_INPUT);
 
        sc->sc_intr = intr_establish(N900LCKBTN_GPIO_BASE + ga->ga_offset,
-                       IST_EDGE_BOTH, IPL_VM, n900lckbtn_intr, sc);
+                       IPL_VM, IST_EDGE_BOTH, n900lckbtn_intr, sc);
        if (sc->sc_intr == NULL) {
                aprint_error(": could not establish interrupt\n");
                gpio_pin_unmap(sc->sc_gpio, &sc->sc_map);



Home | Main Index | Thread Index | Old Index