diff --git a/sys/dev/pckbport/pckbd.c b/sys/dev/pckbport/pckbd.c index 67ce67e4c3b7..95efa8df57f2 100644 --- a/sys/dev/pckbport/pckbd.c +++ b/sys/dev/pckbport/pckbd.c @@ -1,4 +1,4 @@ -/* $NetBSD: pckbd.c,v 1.22 2008/03/15 18:46:22 cube Exp $ */ +/* $NetBSD: pckbd.c,v 1.23 2008/03/15 18:59:07 cube Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -75,7 +75,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pckbd.c,v 1.22 2008/03/15 18:46:22 cube Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pckbd.c,v 1.23 2008/03/15 18:59:07 cube Exp $"); #include #include @@ -122,7 +122,7 @@ struct pckbd_softc { int sc_ledstate; - struct device *sc_wskbddev; + device_t sc_wskbddev; #ifdef WSDISPLAY_COMPAT_RAWKBD int rawkbd; #endif @@ -130,8 +130,8 @@ struct pckbd_softc { static int pckbd_is_console(pckbport_tag_t, pckbport_slot_t); -int pckbdprobe(struct device *, struct cfdata *, void *); -void pckbdattach(struct device *, struct device *, void *); +int pckbdprobe(device_t, cfdata_t, void *); +void pckbdattach(device_t, device_t, void *); CFATTACH_DECL_NEW(pckbd, sizeof(struct pckbd_softc), pckbdprobe, pckbdattach, NULL, NULL); @@ -301,7 +301,7 @@ pckbd_resume(device_t dv PMF_FN_ARGS) * these are both bad jokes */ int -pckbdprobe(struct device *parent, struct cfdata *cf, void *aux) +pckbdprobe(device_t parent, cfdata_t cf, void *aux) { struct pckbport_attach_args *pa = aux; int res; @@ -353,7 +353,7 @@ pckbdprobe(struct device *parent, struct cfdata *cf, void *aux) } void -pckbdattach(struct device *parent, struct device *self, void *aux) +pckbdattach(device_t parent, device_t self, void *aux) { struct pckbd_softc *sc = device_private(self); struct pckbport_attach_args *pa = aux; diff --git a/sys/dev/pckbport/pckbport.c b/sys/dev/pckbport/pckbport.c index abf5110374ea..58fe43bbbeff 100644 --- a/sys/dev/pckbport/pckbport.c +++ b/sys/dev/pckbport/pckbport.c @@ -1,4 +1,4 @@ -/* $NetBSD: pckbport.c,v 1.12 2008/03/15 18:46:22 cube Exp $ */ +/* $NetBSD: pckbport.c,v 1.13 2008/03/15 18:59:07 cube Exp $ */ /* * Copyright (c) 2004 Ben Harris @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pckbport.c,v 1.12 2008/03/15 18:46:22 cube Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pckbport.c,v 1.13 2008/03/15 18:59:07 cube Exp $"); #include #include @@ -128,13 +128,13 @@ pckbport_attach(void *cookie, struct pckbport_accessops const *ops) return t; } -struct device * -pckbport_attach_slot(struct device *dev, pckbport_tag_t t, +device_t +pckbport_attach_slot(device_t dev, pckbport_tag_t t, pckbport_slot_t slot) { struct pckbport_attach_args pa; void *sdata; - struct device *found; + device_t found; int alloced = 0; int locs[PCKBPORTCF_NLOCS]; @@ -145,7 +145,7 @@ pckbport_attach_slot(struct device *dev, pckbport_tag_t t, sdata = malloc(sizeof(struct pckbport_slotdata), M_DEVBUF, M_NOWAIT); if (sdata == NULL) { - printf("%s: no memory\n", dev->dv_xname); + aprint_error_dev(dev, "no memory\n"); return 0; } t->t_slotdata[slot] = sdata; diff --git a/sys/dev/pckbport/pckbportvar.h b/sys/dev/pckbport/pckbportvar.h index 473df8318c7f..bcb4d09863cb 100644 --- a/sys/dev/pckbport/pckbportvar.h +++ b/sys/dev/pckbport/pckbportvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: pckbportvar.h,v 1.7 2008/03/15 18:46:22 cube Exp $ */ +/* $NetBSD: pckbportvar.h,v 1.8 2008/03/15 18:59:07 cube Exp $ */ /* * Copyright (c) 2004 Ben Harris @@ -96,8 +96,7 @@ int pckbport_cnattach(void *, struct pckbport_accessops const *, pckbport_slot_t); pckbport_tag_t pckbport_attach(void *, struct pckbport_accessops const *); -struct device *pckbport_attach_slot(struct device *, pckbport_tag_t, - pckbport_slot_t); +device_t pckbport_attach_slot(device_t, pckbport_tag_t, pckbport_slot_t); void pckbportintr(pckbport_tag_t, pckbport_slot_t, int); /* md hook for use without mi wscons */ diff --git a/sys/dev/pckbport/pms.c b/sys/dev/pckbport/pms.c index 89b0e1060144..f842b724bdca 100644 --- a/sys/dev/pckbport/pms.c +++ b/sys/dev/pckbport/pms.c @@ -1,4 +1,4 @@ -/* $NetBSD: pms.c,v 1.25 2008/03/15 18:46:22 cube Exp $ */ +/* $NetBSD: pms.c,v 1.26 2008/03/15 18:59:07 cube Exp $ */ /*- * Copyright (c) 2004 Kentaro Kurahone. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pms.c,v 1.25 2008/03/15 18:46:22 cube Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pms.c,v 1.26 2008/03/15 18:59:07 cube Exp $"); #include "opt_pms.h" @@ -71,8 +71,8 @@ const struct pms_protocol pms_protocols[] = { }; -int pmsprobe(struct device *, struct cfdata *, void *); -void pmsattach(struct device *, struct device *, void *); +int pmsprobe(device_t, cfdata_t, void *); +void pmsattach(device_t, device_t, void *); void pmsinput(void *, int); CFATTACH_DECL_NEW(pms, sizeof(struct pms_softc), @@ -129,8 +129,7 @@ pms_protocol(pckbport_tag_t tag, pckbport_slot_t slot) } int -pmsprobe(struct device *parent, struct cfdata *match, - void *aux) +pmsprobe(device_t parent, cfdata_t match, void *aux) { struct pckbport_attach_args *pa = aux; u_char cmd[1], resp[2]; @@ -168,7 +167,7 @@ pmsprobe(struct device *parent, struct cfdata *match, } void -pmsattach(struct device *parent, struct device *self, void *aux) +pmsattach(device_t parent, device_t self, void *aux) { struct pms_softc *sc = device_private(self); struct pckbport_attach_args *pa = aux; diff --git a/sys/dev/pckbport/pmsvar.h b/sys/dev/pckbport/pmsvar.h index cb2176c859ba..6ea47cb05ea3 100644 --- a/sys/dev/pckbport/pmsvar.h +++ b/sys/dev/pckbport/pmsvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: pmsvar.h,v 1.6 2008/03/15 18:46:22 cube Exp $ */ +/* $NetBSD: pmsvar.h,v 1.7 2008/03/15 18:59:07 cube Exp $ */ /*- * Copyright (c) 2004 Kentaro Kurahone. @@ -59,7 +59,7 @@ struct pms_softc { /* driver status information */ unsigned char packet[6]; struct timeval last, current; - struct device *sc_wsmousedev; + device_t sc_wsmousedev; struct lwp *sc_event_thread; #ifdef PMS_SYNAPTICS_TOUCHPAD