Module Name: src
Committed By: jmcneill
Date: Thu Aug 4 22:24:45 UTC 2011
Modified Files:
src/sys/dev/i2c: cx24227.c
Log Message:
modularize cx24227
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/i2c/cx24227.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/i2c/cx24227.c
diff -u src/sys/dev/i2c/cx24227.c:1.1 src/sys/dev/i2c/cx24227.c:1.2
--- src/sys/dev/i2c/cx24227.c:1.1 Thu Aug 4 01:48:34 2011
+++ src/sys/dev/i2c/cx24227.c Thu Aug 4 22:24:45 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: cx24227.c,v 1.1 2011/08/04 01:48:34 jakllsch Exp $ */
+/* $NetBSD: cx24227.c,v 1.2 2011/08/04 22:24:45 jmcneill Exp $ */
/*
* Copyright (c) 2008, 2011 Jonathan A. Kollasch
@@ -27,12 +27,13 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cx24227.c,v 1.1 2011/08/04 01:48:34 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cx24227.c,v 1.2 2011/08/04 22:24:45 jmcneill Exp $");
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/device.h>
#include <sys/kmem.h>
+#include <sys/module.h>
#include <dev/i2c/cx24227var.h>
@@ -264,7 +265,7 @@
static int
cx24227_init(struct cx24227 *sc)
{
- int i;
+ unsigned int i;
uint16_t reg;
cx24227_sleepreset(sc);
@@ -305,3 +306,13 @@
return 0;
}
+
+MODULE(MODULE_CLASS_DRIVER, cx24227, NULL);
+
+static int
+cx24227_modcmd(modcmd_t cmd, void *priv)
+{
+ if (cmd == MODULE_CMD_INIT || cmd == MODULE_CMD_FINI)
+ return 0;
+ return ENOTTY;
+}