diff options
| author | skrll <skrll@NetBSD.org> | 2009-05-07 15:34:49 +0000 |
|---|---|---|
| committer | skrll <skrll@NetBSD.org> | 2009-05-07 15:34:49 +0000 |
| commit | 7ab26758f5b33c6e6fdffc351aa3e5b6d94042db (patch) | |
| tree | f07cd6f47af081714d12062bf53ac254f63b08b3 /sys/dev | |
| parent | 0b960e17e71c22f34cdf6844cf2777b94f28bc8d (diff) | |
device_t/softc split
struct device * -> device_t
struct cfdata * -> cfdata_t
Use aprint*
There are a couple of MI drivers with MD attachments left.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/ic/sti.c | 26 | ||||
| -rw-r--r-- | sys/dev/ic/stivar.h | 4 |
2 files changed, 15 insertions, 15 deletions
diff --git a/sys/dev/ic/sti.c b/sys/dev/ic/sti.c index 25bf6f6525f..64908c29224 100644 --- a/sys/dev/ic/sti.c +++ b/sys/dev/ic/sti.c @@ -1,4 +1,4 @@ -/* $NetBSD: sti.c,v 1.9 2008/04/08 12:07:27 cegger Exp $ */ +/* $NetBSD: sti.c,v 1.10 2009/05/07 15:34:50 skrll Exp $ */ /* $OpenBSD: sti.c,v 1.35 2003/12/16 06:07:13 mickey Exp $ */ @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sti.c,v 1.9 2008/04/08 12:07:27 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sti.c,v 1.10 2009/05/07 15:34:50 skrll Exp $"); #include "wsdisplay.h" @@ -117,7 +117,7 @@ void sti_bmove(struct sti_softc *, int, int, int, int, int, int, enum sti_bmove_funcs); int sti_setcment(struct sti_softc *, u_int, u_char, u_char, u_char); int sti_fetchfonts(struct sti_softc *, struct sti_inqconfout *, u_int32_t); -void sti_attach_deferred(struct device *); +void sti_attach_deferred(device_t); void sti_attach_common(struct sti_softc *sc) @@ -333,12 +333,12 @@ sti_attach_common(struct sti_softc *sc) printf(": %s rev %d.%02d;%d, ID 0x%016llX\n" "%s: %dx%d frame buffer, %dx%dx%d display, offset %dx%d\n", cfg.name, dd->dd_grrev >> 4, dd->dd_grrev & 0xf, dd->dd_lrrev, - *(u_int64_t *)dd->dd_grid, device_xname(&sc->sc_dev), cfg.fbwidth, + *(u_int64_t *)dd->dd_grid, device_xname(sc->sc_dev), cfg.fbwidth, cfg.fbheight, cfg.width, cfg.height, cfg.bppu, cfg.owidth, cfg.oheight); if ((error = sti_fetchfonts(sc, &cfg, dd->dd_fntaddr))) { - aprint_error_dev(&sc->sc_dev, "cannot fetch fonts (%d)\n", + aprint_error_dev(sc->sc_dev, "cannot fetch fonts (%d)\n", error); return; } @@ -356,15 +356,15 @@ sti_attach_common(struct sti_softc *sc) sti_default_screen.fontheight = sc->sc_curfont.height; #if NWSDISPLAY > 0 - config_interrupts(&sc->sc_dev, sti_attach_deferred); + config_interrupts(sc->sc_dev, sti_attach_deferred); #endif } void -sti_attach_deferred(struct device *dev) +sti_attach_deferred(device_t dev) { - struct sti_softc *sc = (struct sti_softc *) dev; + struct sti_softc *sc = device_private(dev); struct wsemuldisplaydev_attach_args waa; long defattr; @@ -380,7 +380,7 @@ sti_attach_deferred(struct device *dev) 0, sti_default_screen.nrows - 1, defattr); } - config_found(&sc->sc_dev, &waa, wsemuldisplaydevprint); + config_found(sc->sc_dev, &waa, wsemuldisplaydevprint); } int @@ -422,7 +422,7 @@ sti_fetchfonts(struct sti_softc *sc, struct sti_inqconfout *cfg, u_int32_t addr) (u_int32_t *)fp, sizeof(struct sti_font) / 4); printf("%s: %dx%d font type %d, %d bpc, charset %d-%d\n", - device_xname(&sc->sc_dev), fp->width, fp->height, fp->type, + device_xname(sc->sc_dev), fp->width, fp->height, fp->type, fp->bpc, fp->first, fp->last); size = sizeof(struct sti_font) + @@ -464,7 +464,7 @@ sti_fetchfonts(struct sti_softc *sc, struct sti_inqconfout *cfg, u_int32_t addr) (*sc->unpmv)(&a.flags, &a.in, &a.out, &sc->sc_cfg); if (a.out.errno) { - aprint_error_dev(&sc->sc_dev, "unpmv %d returned %d\n", + aprint_error_dev(sc->sc_dev, "unpmv %d returned %d\n", uc, a.out.errno); return (0); } @@ -494,7 +494,7 @@ sti_init(struct sti_softc *sc, int mode) STI_INITF_PBETI | STI_INITF_ICMT : 0); a.in.text_planes = 1; #ifdef STIDEBUG - printf("%s: init,%p(%x, %p, %p, %p)\n", device_xname(&sc->sc_dev), + printf("%s: init,%p(%x, %p, %p, %p)\n", device_xname(sc->sc_dev), sc->init, a.flags.flags, &a.in, &a.out, &sc->sc_cfg); #endif (*sc->init)(&a.flags, &a.in, &a.out, &sc->sc_cfg); @@ -556,7 +556,7 @@ sti_bmove(struct sti_softc *sc, int x1, int y1, int x2, int y2, int h, int w, (*sc->blkmv)(&a.flags, &a.in, &a.out, &sc->sc_cfg); #ifdef STIDEBUG if (a.out.errno) - aprint_error_dev(&sc->sc_dev, "blkmv returned %d\n", + aprint_error_dev(sc->sc_dev, "blkmv returned %d\n", a.out.errno); #endif } diff --git a/sys/dev/ic/stivar.h b/sys/dev/ic/stivar.h index db08db09a69..0e37d5caf5b 100644 --- a/sys/dev/ic/stivar.h +++ b/sys/dev/ic/stivar.h @@ -1,4 +1,4 @@ -/* $NetBSD: stivar.h,v 1.2 2005/12/11 12:21:28 christos Exp $ */ +/* $NetBSD: stivar.h,v 1.3 2009/05/07 15:34:50 skrll Exp $ */ /* $OpenBSD: stivar.h,v 1.15 2003/12/16 06:07:13 mickey Exp $ */ @@ -32,7 +32,7 @@ #define _IC_STIVAR_H_ struct sti_softc { - struct device sc_dev; + device_t sc_dev; void *sc_ih; u_int sc_wsmode; |
