Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/iscsi Simplify.
details: https://anonhg.NetBSD.org/src/rev/de3cf33e102f
branches: trunk
changeset: 336248:de3cf33e102f
user: joerg <joerg%NetBSD.org@localhost>
date: Sat Feb 21 12:32:23 2015 +0000
description:
Simplify.
diffstat:
sys/dev/iscsi/iscsi_main.c | 10 ++--------
1 files changed, 2 insertions(+), 8 deletions(-)
diffs (64 lines):
diff -r 6f5795e1a83e -r de3cf33e102f sys/dev/iscsi/iscsi_main.c
--- a/sys/dev/iscsi/iscsi_main.c Sat Feb 21 12:05:47 2015 +0000
+++ b/sys/dev/iscsi/iscsi_main.c Sat Feb 21 12:32:23 2015 +0000
@@ -501,13 +501,13 @@
}
}
+#ifdef _MODULE
/* Kernel Module support */
#include <sys/module.h>
MODULE(MODULE_CLASS_DRIVER, iscsi, NULL);
-#ifdef _MODULE
static const struct cfiattrdata ibescsi_info = { "scsi", 1,
{{"channel", "-1", -1},}
};
@@ -528,19 +528,15 @@
},
{ NULL, NULL, 0, 0, NULL, 0, NULL }
};
-#endif
static int
iscsi_modcmd(modcmd_t cmd, void *arg)
{
-#ifdef _MODULE
devmajor_t cmajor = NODEVMAJOR, bmajor = NODEVMAJOR;
int error;
-#endif
switch (cmd) {
case MODULE_CMD_INIT:
-#ifdef _MODULE
error = config_cfdriver_attach(&iscsi_cd);
if (error) {
return error;
@@ -581,12 +577,10 @@
config_cfdriver_detach(&iscsi_cd);
return ENXIO;
}
-#endif
return 0;
break;
case MODULE_CMD_FINI:
-#ifdef _MODULE
error = config_cfdata_detach(iscsi_cfdata);
if (error)
return error;
@@ -594,7 +588,6 @@
config_cfattach_detach(iscsi_cd.cd_name, &iscsi_ca);
config_cfdriver_detach(&iscsi_cd);
devsw_detach(NULL, &iscsi_cdevsw);
-#endif
return 0;
break;
@@ -607,3 +600,4 @@
break;
}
}
+#endif /* _MODULE */
Home |
Main Index |
Thread Index |
Old Index