summaryrefslogtreecommitdiff
path: root/sys/dev/ata
diff options
context:
space:
mode:
authorthorpej <thorpej@NetBSD.org>2004-10-15 04:38:36 +0000
committerthorpej <thorpej@NetBSD.org>2004-10-15 04:38:36 +0000
commit45bba4e135544fab4512fd29778ab6499d58993d (patch)
treee98bbd04d3dae86c53cac1996d8d704c4820c05e /sys/dev/ata
parentd5e42fa312632b23bd2eb076635d7a3e5d61e739 (diff)
Change config_attach_pseudo() to take a cfdata * that contains the
necessary information to create the pseudo-device instance. Pseudo-device device's will reference this cfdata, just as normal devices reference their corresponding cfdata. Welcome to 2.99.10.
Diffstat (limited to 'sys/dev/ata')
-rw-r--r--sys/dev/ata/ata_raid.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/dev/ata/ata_raid.c b/sys/dev/ata/ata_raid.c
index 1be80cb15fc..603320938f4 100644
--- a/sys/dev/ata/ata_raid.c
+++ b/sys/dev/ata/ata_raid.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ata_raid.c,v 1.9 2004/09/13 12:55:47 drochner Exp $ */
+/* $NetBSD: ata_raid.c,v 1.10 2004/10/15 04:38:36 thorpej Exp $ */
/*
* Copyright (c) 2003 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ata_raid.c,v 1.9 2004/09/13 12:55:47 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ata_raid.c,v 1.10 2004/10/15 04:38:36 thorpej Exp $");
#include <sys/param.h>
#include <sys/buf.h>
@@ -130,6 +130,12 @@ ata_raid_type_name(u_int type)
static int
ata_raid_finalize(struct device *self)
{
+ static struct cfdata ataraid_cfdata = {
+ .cf_name = "ataraid",
+ .cf_atname = "ataraid",
+ .cf_unit = DVUNIT_ANY,
+ .cf_fstate = FSTATE_STAR,
+ };
extern struct cfdriver ataraid_cd;
static int done_once;
int error;
@@ -153,7 +159,7 @@ ata_raid_finalize(struct device *self)
goto out;
}
- if (config_attach_pseudo(ataraid_cd.cd_name, -1) == NULL)
+ if (config_attach_pseudo(&ataraid_cfdata) == NULL)
printf("%s: unable to attach an instance\n",
ataraid_cd.cd_name);