Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/i2c modularize mt2131
details: https://anonhg.NetBSD.org/src/rev/7a035309f3c4
branches: trunk
changeset: 767966:7a035309f3c4
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Thu Aug 04 22:24:29 2011 +0000
description:
modularize mt2131
diffstat:
sys/dev/i2c/mt2131.c | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diffs (40 lines):
diff -r d5d09dde7250 -r 7a035309f3c4 sys/dev/i2c/mt2131.c
--- a/sys/dev/i2c/mt2131.c Thu Aug 04 21:59:35 2011 +0000
+++ b/sys/dev/i2c/mt2131.c Thu Aug 04 22:24:29 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mt2131.c,v 1.1 2011/08/04 01:45:37 jakllsch Exp $ */
+/* $NetBSD: mt2131.c,v 1.2 2011/08/04 22:24:29 jmcneill Exp $ */
/*
* Copyright (c) 2008, 2011 Jonathan A. Kollasch
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mt2131.c,v 1.1 2011/08/04 01:45:37 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mt2131.c,v 1.2 2011/08/04 22:24:29 jmcneill Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -35,6 +35,7 @@
#include <sys/kmem.h>
#include <sys/syslog.h>
#include <sys/proc.h>
+#include <sys/module.h>
#include <dev/i2c/mt2131var.h>
@@ -264,3 +265,13 @@
return ret;
}
+
+MODULE(MODULE_CLASS_DRIVER, mt2131, NULL);
+
+static int
+mt2131_modcmd(modcmd_t cmd, void *priv)
+{
+ if (cmd == MODULE_CMD_INIT || cmd == MODULE_CMD_FINI)
+ return 0;
+ return ENOTTY;
+}
Home |
Main Index |
Thread Index |
Old Index