Module Name:    src
Committed By:   hannken
Date:           Sun Jun 22 09:48:20 UTC 2014

Modified Files:
        src/sys/dev/pci: piixpm.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/dev/pci/piixpm.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/piixpm.c
diff -u src/sys/dev/pci/piixpm.c:1.44 src/sys/dev/pci/piixpm.c:1.45
--- src/sys/dev/pci/piixpm.c:1.44	Sat Mar 29 19:28:25 2014
+++ src/sys/dev/pci/piixpm.c	Sun Jun 22 09:48:20 2014
@@ -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 @@ piixpm_i2c_exec(void *cookie, i2c_op_t o
 		}
 		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 @@ timeout:
 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;

Reply via email to