diff options
| author | jakllsch <jakllsch@NetBSD.org> | 2010-02-26 23:52:43 +0000 |
|---|---|---|
| committer | jakllsch <jakllsch@NetBSD.org> | 2010-02-26 23:52:43 +0000 |
| commit | 7d0469d4c45b68a7745959900a61688cf9dcdd96 (patch) | |
| tree | a37915c91db982ad710592ebe280c5456c6f8741 /sys/dev/dm | |
| parent | f0e3fdff974fc41f20b01d4ff40117f20184ae87 (diff) | |
Use correct prototype for dmattach().
Diffstat (limited to 'sys/dev/dm')
| -rw-r--r-- | sys/dev/dm/device-mapper.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/sys/dev/dm/device-mapper.c b/sys/dev/dm/device-mapper.c index 36a5279fc00..925e732cd10 100644 --- a/sys/dev/dm/device-mapper.c +++ b/sys/dev/dm/device-mapper.c @@ -1,4 +1,4 @@ -/* $NetBSD: device-mapper.c,v 1.17 2010/02/25 23:37:39 haad Exp $ */ +/* $NetBSD: device-mapper.c,v 1.18 2010/02/26 23:52:43 jakllsch Exp $ */ /* * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -46,7 +46,6 @@ #include <sys/ioccom.h> #include <sys/kmem.h> #include <sys/module.h> -#include <sys/once.h> #include "netbsd-dm.h" #include "dm.h" @@ -60,9 +59,10 @@ static dev_type_strategy(dmstrategy); static dev_type_size(dmsize); /* attach and detach routines */ -int dmattach(void); +void dmattach(int); int dmdestroy(void); +static int doinit(void); static int dm_cmd_to_fun(prop_dictionary_t); static int disk_ioctl_switch(dev_t, u_long, void *); static int dm_ioctl_switch(u_long); @@ -161,11 +161,9 @@ dm_modcmd(modcmd_t cmd, void *arg) if (error) break; - error = dmattach(); + error = doinit(); if (error) { config_cfdriver_detach(&dm_cd); - aprint_error("%s: unable to register cfattach\n", - dm_cd.cd_name); break; } @@ -278,7 +276,8 @@ doinit(void) error = config_cfattach_attach(dm_cd.cd_name, &dm_ca); if (error) { - aprint_error("Unable to register cfattach for dm driver\n"); + aprint_error("%s: unable to register cfattach\n", + dm_cd.cd_name); return error; } @@ -290,12 +289,10 @@ doinit(void) } /* attach routine */ -int -dmattach(void) +void +dmattach(int n) { - static ONCE_DECL(control); - - return RUN_ONCE(&control, doinit); + doinit(); } /* Destroy routine */ |
