summaryrefslogtreecommitdiff
path: root/sys/arch/atari/dev
diff options
context:
space:
mode:
authortsutsui <tsutsui@NetBSD.org>2011-06-05 06:31:41 +0000
committertsutsui <tsutsui@NetBSD.org>2011-06-05 06:31:41 +0000
commitf0bd8600c4db34a7a99be51cf4eaf8221ffbe95f (patch)
tree965047de7f024fec8bb0f88f6486535b020b397e /sys/arch/atari/dev
parentf9fffcff2c7e747586cfa206b917bb8f72ec89ae (diff)
- use CFATTACH_DECL_NEW() (no softc)
- use device_t, cfdata_t etc.
Diffstat (limited to 'sys/arch/atari/dev')
-rw-r--r--sys/arch/atari/dev/grf.c26
-rw-r--r--sys/arch/atari/dev/kbd.c20
2 files changed, 23 insertions, 23 deletions
diff --git a/sys/arch/atari/dev/grf.c b/sys/arch/atari/dev/grf.c
index 4524100c98b..676c7cf565a 100644
--- a/sys/arch/atari/dev/grf.c
+++ b/sys/arch/atari/dev/grf.c
@@ -1,4 +1,4 @@
-/* $NetBSD: grf.c,v 1.44 2011/02/08 20:20:10 rmind Exp $ */
+/* $NetBSD: grf.c,v 1.45 2011/06/05 06:31:41 tsutsui Exp $ */
/*
* Copyright (c) 1995 Leo Weppelman
@@ -46,7 +46,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: grf.c,v 1.44 2011/02/08 20:20:10 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: grf.c,v 1.45 2011/06/05 06:31:41 tsutsui Exp $");
#include <sys/param.h>
#include <sys/proc.h>
@@ -90,16 +90,16 @@ int grfon(dev_t);
int grfoff(dev_t);
int grfsinfo(dev_t, struct grfdyninfo *);
-int grfbusprint(void *auxp, const char *);
-int grfbusmatch(struct device *, struct cfdata *, void *);
-void grfbusattach(struct device *, struct device *, void *);
+int grfbusprint(void *, const char *);
+int grfbusmatch(device_t, cfdata_t, void *);
+void grfbusattach(device_t, device_t, void *);
/*
* pointers to grf drivers device structs
*/
struct grf_softc *grfsp[NGRF]; /* XXX */
-CFATTACH_DECL(grfbus, sizeof(struct device),
+CFATTACH_DECL_NEW(grfbus, 0,
grfbusmatch, grfbusattach, NULL, NULL);
dev_type_open(grfopen);
@@ -118,35 +118,35 @@ const struct cdevsw grf_cdevsw = {
static struct cfdata *cfdata_gbus = NULL;
int
-grfbusmatch(struct device *pdp, struct cfdata *cfp, void *auxp)
+grfbusmatch(device_t parent, cfdata_t cf, void *aux)
{
- if (strcmp(auxp, grfbus_cd.cd_name))
+ if (strcmp(aux, grfbus_cd.cd_name))
return 0;
if (atari_realconfig == 0)
- cfdata_gbus = cfp;
+ cfdata_gbus = cf;
return 1; /* Always there */
}
void
-grfbusattach(struct device *pdp, struct device *dp, void *auxp)
+grfbusattach(device_t parent, device_t self, void *aux)
{
grf_auxp_t grf_auxp;
grf_auxp.busprint = grfbusprint;
grf_auxp.from_bus_match = 1;
- if (dp == NULL) /* Console init */
+ if (self == NULL) /* Console init */
atari_config_found(cfdata_gbus, NULL, &grf_auxp, grfbusprint);
else {
printf("\n");
- config_found(dp, &grf_auxp, grfbusprint);
+ config_found(self, &grf_auxp, grfbusprint);
}
}
int
-grfbusprint(void *auxp, const char *name)
+grfbusprint(void *aux, const char *name)
{
if (name == NULL)
diff --git a/sys/arch/atari/dev/kbd.c b/sys/arch/atari/dev/kbd.c
index 4f4d87b2d16..55224e0cec1 100644
--- a/sys/arch/atari/dev/kbd.c
+++ b/sys/arch/atari/dev/kbd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: kbd.c,v 1.41 2010/04/13 11:31:11 tsutsui Exp $ */
+/* $NetBSD: kbd.c,v 1.42 2011/06/05 06:31:41 tsutsui Exp $ */
/*
* Copyright (c) 1995 Leo Weppelman
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.41 2010/04/13 11:31:11 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.42 2011/06/05 06:31:41 tsutsui Exp $");
#include "mouse.h"
#include "ite.h"
@@ -117,15 +117,15 @@ dev_type_kqfilter(kbdkqfilter);
void kbdintr(int);
static void kbdsoft(void *);
-static void kbdattach(struct device *, struct device *, void *);
-static int kbdmatch(struct device *, struct cfdata *, void *);
+static void kbdattach(device_t, device_t, void *);
+static int kbdmatch(device_t, cfdata_t, void *);
#if NITE>0
static int kbd_do_modifier(uint8_t);
#endif
static int kbd_write_poll(const uint8_t *, int);
static void kbd_pkg_start(struct kbd_softc *, uint8_t);
-CFATTACH_DECL(kbd, sizeof(struct device),
+CFATTACH_DECL_NEW(kbd, 0,
kbdmatch, kbdattach, NULL, NULL);
const struct cdevsw kbd_cdevsw = {
@@ -165,17 +165,17 @@ static struct wskbd_mapdata kbd_mapdata = {
/*ARGSUSED*/
static int
-kbdmatch(struct device *pdp, struct cfdata *cfp, void *auxp)
+kbdmatch(device_t parent, cfdata_t cf, void *aux)
{
- if (!strcmp((char *)auxp, "kbd"))
+ if (!strcmp((char *)aux, "kbd"))
return 1;
return 0;
}
/*ARGSUSED*/
static void
-kbdattach(struct device *pdp, struct device *dp, void *auxp)
+kbdattach(device_t parent, device_t self, void *aux)
{
int timeout;
const uint8_t kbd_rst[] = { 0x80, 0x01 };
@@ -222,7 +222,7 @@ kbdattach(struct device *pdp, struct device *dp, void *auxp)
kbd_softc.k_sicookie = softint_establish(SOFTINT_SERIAL, kbdsoft, NULL);
#if NWSKBD>0
- if (dp != NULL) {
+ if (self != NULL) {
/*
* Try to attach the wskbd.
*/
@@ -235,7 +235,7 @@ kbdattach(struct device *pdp, struct device *dp, void *auxp)
waa.keymap = &kbd_mapdata;
waa.accessops = &kbd_accessops;
waa.accesscookie = NULL;
- kbd_softc.k_wskbddev = config_found(dp, &waa, wskbddevprint);
+ kbd_softc.k_wskbddev = config_found(self, &waa, wskbddevprint);
kbd_softc.k_pollingmode = 0;