Use CFATTACH_DECL_NEW(). (no softc)

This commit is contained in:
tsutsui 2008-04-04 16:33:05 +00:00
parent 9a86ae19d5
commit bc7b528919
1 changed files with 8 additions and 8 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: cpu.c,v 1.2 2008/01/04 22:15:09 ad Exp $ */
/* $NetBSD: cpu.c,v 1.3 2008/04/04 16:33:05 tsutsui Exp $ */
/*
* Copyright (c) 2000 Soren S. Jorvang. All rights reserved.
@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.2 2008/01/04 22:15:09 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.3 2008/04/04 16:33:05 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -36,16 +36,16 @@ __KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.2 2008/01/04 22:15:09 ad Exp $");
#include "ioconf.h"
int cpumatch(struct device *, struct cfdata *, void *);
void cpuattach(struct device *, struct device *, void *);
int cpumatch(device_t, cfdata_t, void *);
void cpuattach(device_t, device_t, void *);
CFATTACH_DECL(cpu, sizeof (struct device),
CFATTACH_DECL_NEW(cpu, 0,
cpumatch, cpuattach, NULL, NULL);
static int cpu_attached;
int
cpumatch(struct device *parent, struct cfdata *cf, void *aux)
cpumatch(device_t parent, cfdata_t cf, void *aux)
{
struct mainbus_attach_args *ma = aux;
@ -57,10 +57,10 @@ cpumatch(struct device *parent, struct cfdata *cf, void *aux)
}
void
cpuattach(struct device *parent, struct device *dev, void *aux)
cpuattach(device_t parent, device_t self, void *aux)
{
printf(": ");
aprint_normal(": ");
cpu_attached = 1;
cpu_identify();