Module Name:    src
Committed By:   tsutsui
Date:           Mon Apr 12 13:05:25 UTC 2010

Modified Files:
        src/sys/arch/atari/dev: lpt.c

Log Message:
Replace old MD sicallback functions with MI softint(9).


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/atari/dev/lpt.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/arch/atari/dev/lpt.c
diff -u src/sys/arch/atari/dev/lpt.c:1.32 src/sys/arch/atari/dev/lpt.c:1.33
--- src/sys/arch/atari/dev/lpt.c:1.32	Mon Nov 23 00:11:43 2009
+++ src/sys/arch/atari/dev/lpt.c	Mon Apr 12 13:05:25 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: lpt.c,v 1.32 2009/11/23 00:11:43 rmind Exp $ */
+/*	$NetBSD: lpt.c,v 1.33 2010/04/12 13:05:25 tsutsui Exp $ */
 
 /*
  * Copyright (c) 1996 Leo Weppelman
@@ -56,7 +56,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lpt.c,v 1.32 2009/11/23 00:11:43 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lpt.c,v 1.33 2010/04/12 13:05:25 tsutsui Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -104,6 +104,7 @@
 	u_char		sc_flags;
 #define	LPT_AUTOLF	0x20	/* automatic LF on CR XXX: LWP - not yet... */
 #define	LPT_NOINTR	0x40	/* do not use interrupt */
+	void		*sc_sicookie;
 };
 
 #define	LPTUNIT(s)	(minor(s) & 0x1f)
@@ -118,9 +119,9 @@
 
 static void lptwakeup (void *arg);
 static int pushbytes (struct lpt_softc *);
-static void lptpseudointr (struct lpt_softc *);
+static void lptpseudointr (void *);
 int lptintr (struct lpt_softc *);
-int lpthwintr (struct lpt_softc *, int);
+int lpthwintr (void *);
 
 
 /*
@@ -166,6 +167,7 @@
 	if (intr_establish(0, USER_VEC, 0, (hw_ifun_t)lpthwintr, sc) == NULL)
 		aprint_error_dev(dp, "Can't establish interrupt\n");
 	ym2149_strobe(1);
+	sc->sc_sicookie = softint_establish(SOFTINT_SERIAL, lptpseudointr, sc);
 
 	callout_init(&sc->sc_wakeup_ch, 0);
 }
@@ -382,21 +384,24 @@
 }
 
 static void
-lptpseudointr(struct lpt_softc *sc)
+lptpseudointr(void *arg)
 {
+	struct lpt_softc *sc;
 	int	s;
 
+	sc = arg;
 	s = spltty();
 	lptintr(sc);
 	splx(s);
 }
 
 int
-lpthwintr(struct lpt_softc *sc, int sr)
+lpthwintr(void *arg)
 {
-	if (!BASEPRI(sr))
-		add_sicallback((si_farg)lptpseudointr, sc, 0);
-	else lptpseudointr(sc);
+	struct lpt_softc *sc;
+
+	sc = arg;
+	softint_schedule(sc->sc_sicookie);
 	return 1;
 }
 

Reply via email to