Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Consistently pass a "struct piixpm_softc" to pii...



details:   https://anonhg.NetBSD.org/src/rev/06dee18a849d
branches:  trunk
changeset: 330088:06dee18a849d
user:      hannken <hannken%NetBSD.org@localhost>
date:      Sun Jun 22 09:48:20 2014 +0000

description:
Consistently pass a "struct piixpm_softc" to piixpm_intr.
Prevents a crash on hardware interrupts.

diffstat:

 sys/dev/pci/piixpm.c |  9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diffs (37 lines):

diff -r 506a86e797d2 -r 06dee18a849d sys/dev/pci/piixpm.c
--- a/sys/dev/pci/piixpm.c      Sun Jun 22 09:47:40 2014 +0000
+++ b/sys/dev/pci/piixpm.c      Sun Jun 22 09:48:20 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: piixpm.c,v 1.44 2014/03/29 19:28:25 christos Exp $ */
+/* $NetBSD: piixpm.c,v 1.45 2014/06/22 09:48:20 hannken Exp $ */
 /*     $OpenBSD: piixpm.c,v 1.20 2006/02/27 08:25:02 grange Exp $      */
 
 /*
@@ -22,7 +22,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: piixpm.c,v 1.44 2014/03/29 19:28:25 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: piixpm.c,v 1.45 2014/06/22 09:48:20 hannken Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -508,7 +508,7 @@
                }
                if (st & PIIX_SMB_HS_BUSY)
                        goto timeout;
-               piixpm_intr(smbus);
+               piixpm_intr(sc);
        } else {
                /* Wait for interrupt */
                if (tsleep(sc, PRIBIO, "iicexec", PIIXPM_TIMEOUT * hz))
@@ -543,8 +543,7 @@
 static int
 piixpm_intr(void *arg)
 {
-       struct piixpm_smbus *smbus = arg;
-       struct piixpm_softc *sc = smbus->softc;
+       struct piixpm_softc *sc = arg;
        u_int8_t st;
        u_int8_t *b;
        size_t len;



Home | Main Index | Thread Index | Old Index