Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/hpcsh/dev make this compile with DIAGNOSTIC and PSH...
details: https://anonhg.NetBSD.org/src/rev/e0c237b45e96
branches: trunk
changeset: 756953:e0c237b45e96
user: chs <chs%NetBSD.org@localhost>
date: Sun Aug 08 16:51:34 2010 +0000
description:
make this compile with DIAGNOSTIC and PSH3TP_DEBUG.
diffstat:
sys/arch/hpcsh/dev/psh3tp.c | 29 +++++++++++++++--------------
1 files changed, 15 insertions(+), 14 deletions(-)
diffs (124 lines):
diff -r 66ea998027db -r e0c237b45e96 sys/arch/hpcsh/dev/psh3tp.c
--- a/sys/arch/hpcsh/dev/psh3tp.c Sun Aug 08 16:27:30 2010 +0000
+++ b/sys/arch/hpcsh/dev/psh3tp.c Sun Aug 08 16:51:34 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: psh3tp.c,v 1.14 2010/07/24 15:33:12 tsutsui Exp $ */
+/* $NetBSD: psh3tp.c,v 1.15 2010/08/08 16:51:34 chs Exp $ */
/*
* Copyright (c) 2005 KIYOHARA Takashi
* All rights reserved.
@@ -213,7 +213,7 @@
psh3tp_enable(struct psh3tp_softc *sc __unused)
{
- DPRINTFN(2, ("%s: enable\n", sc->sc_dev.dv_xname));
+ DPRINTFN(2, ("%s: enable\n", device_xname(sc->sc_dev)));
intc_intr_enable(SH7709_INTEVT2_IRQ2);
}
@@ -226,7 +226,7 @@
psh3tp_disable(struct psh3tp_softc *sc)
{
- DPRINTFN(2, ("%s: disable\n", sc->sc_dev.dv_xname));
+ DPRINTFN(2, ("%s: disable\n", device_xname(sc->sc_dev)));
intc_intr_disable(SH7709_INTEVT2_IRQ2);
callout_stop(&sc->sc_touch_ch);
}
@@ -257,7 +257,7 @@
{
struct psh3tp_softc *sc = (struct psh3tp_softc *)cookie;
- DPRINTFN(1, ("%s: wsmouse enable\n", sc->sc_dev.dv_xname));
+ DPRINTFN(1, ("%s: wsmouse enable\n", device_xname(sc->sc_dev)));
return psh3tp_set_enable(sc, 1, PSH3TP_WSMOUSE_ENABLED);
}
@@ -267,7 +267,7 @@
{
struct psh3tp_softc *sc = (struct psh3tp_softc *)cookie;
- DPRINTFN(1, ("%s: wsmouse disable\n", sc->sc_dev.dv_xname));
+ DPRINTFN(1, ("%s: wsmouse disable\n", device_xname(sc->sc_dev)));
psh3tp_set_enable(sc, 0, PSH3TP_WSMOUSE_ENABLED);
}
@@ -284,13 +284,13 @@
irr0 = _reg_read_1(SH7709_IRR0);
if ((irr0 & IRR0_IRQ2) == 0) {
#ifdef DIAGNOSTIC
- printf("%s: irr0 %02x?\n", sc->sc_dev.dv_xname, irr0);
+ printf("%s: irr0 %02x?\n", device_xname(sc->sc_dev), irr0);
#endif
return 0;
}
if (!sc->sc_enabled) {
- DPRINTFN(1, ("%s: intr: !sc_enabled\n", sc->sc_dev.dv_xname));
+ DPRINTFN(1, ("%s: intr: !sc_enabled\n", device_xname(sc->sc_dev)));
intc_intr_disable(SH7709_INTEVT2_IRQ2);
goto served;
}
@@ -318,7 +318,8 @@
}
if (--tremor_timeout == 0) {
- DPRINTF(("%s: tremor timeout!\n", sc->sc_dev.dv_xname));
+ DPRINTF(("%s: tremor timeout!\n",
+ device_xname(sc->sc_dev)));
goto served;
}
} while (steady < TREMOR_THRESHOLD);
@@ -334,7 +335,7 @@
callout_reset(&sc->sc_touch_ch,
hz/32, psh3tp_start_polling, sc);
} else
- DPRINTFN(1, ("%s: tremor\n", sc->sc_dev.dv_xname));
+ DPRINTFN(1, ("%s: tremor\n", device_xname(sc->sc_dev)));
served:
/* clear the interrupt */
_reg_write_1(SH7709_IRR0, irr0 & ~IRR0_IRQ2);
@@ -357,14 +358,14 @@
phdr = _reg_read_1(SH7709_PHDR);
if ((phdr & PHDR_TP_PEN_UP) == PHDR_TP_PEN_UP) {
DPRINTFN(2, ("%s: start: pen is not down\n",
- sc->sc_dev.dv_xname));
+ device_xname(sc->sc_dev)));
psh3tp_stop_polling(sc);
return;
}
psh3tp_get_raw_xy(&rawx, &rawy);
DPRINTFN(2, ("%s: start: %4d %4d -> ",
- sc->sc_dev.dv_xname, rawx, rawy));
+ device_xname(sc->sc_dev), rawx, rawy));
if (sc->sc_enabled & PSH3TP_WSMOUSE_ENABLED) {
DPRINTFN(2, ("mouse\n"));
@@ -388,7 +389,7 @@
{
uint8_t irr0;
- DPRINTFN(2, ("%s: stop\n", sc->sc_dev.dv_xname));
+ DPRINTFN(2, ("%s: stop\n", device_xname(sc->sc_dev)));
/* clear pending interrupt signal before re-enabling the interrupt */
irr0 = _reg_read_1(SH7709_IRR0);
@@ -414,7 +415,7 @@
if (!sc->sc_enabled) {
DPRINTFN(1, ("%s: wsmouse callout: !sc_enabled\n",
- sc->sc_dev.dv_xname));
+ device_xname(sc->sc_dev)));
splx(s);
return;
}
@@ -444,7 +445,7 @@
tpcalib_trans(&sc->sc_tpcalib, rawx, rawy, &x, &y);
DPRINTFN(3, ("%s: %4d %4d -> %3d %3d\n",
- sc->sc_dev.dv_xname, rawx, rawy, x, y));
+ device_xname(sc->sc_dev), rawx, rawy, x, y));
wsmouse_input(sc->sc_wsmousedev,
1, /* button */
Home |
Main Index |
Thread Index |
Old Index