Mon Apr 13 22:26:20 2015 UTC ()
Add required dependency on i2cexec


(pgoyette)
diff -r1.48 -r1.49 src/sys/dev/i2c/i2c.c

cvs diff -r1.48 -r1.49 src/sys/dev/i2c/i2c.c (expand / switch to unified diff)

--- src/sys/dev/i2c/i2c.c 2015/04/04 15:16:54 1.48
+++ src/sys/dev/i2c/i2c.c 2015/04/13 22:26:20 1.49
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: i2c.c,v 1.48 2015/04/04 15:16:54 christos Exp $ */ 1/* $NetBSD: i2c.c,v 1.49 2015/04/13 22:26:20 pgoyette Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2003 Wasabi Systems, Inc. 4 * Copyright (c) 2003 Wasabi Systems, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Written by Jason R. Thorpe for Wasabi Systems, Inc. 7 * Written by Jason R. Thorpe for Wasabi Systems, Inc.
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
11 * are met: 11 * are met:
12 * 1. Redistributions of source code must retain the above copyright 12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer. 13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright 14 * 2. Redistributions in binary form must reproduce the above copyright
@@ -30,27 +30,27 @@ @@ -30,27 +30,27 @@
30 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 30 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 31 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 32 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 33 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 34 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35 * POSSIBILITY OF SUCH DAMAGE. 35 * POSSIBILITY OF SUCH DAMAGE.
36 */ 36 */
37 37
38#ifdef _KERNEL_OPT 38#ifdef _KERNEL_OPT
39#include "opt_i2c.h" 39#include "opt_i2c.h"
40#endif 40#endif
41 41
42#include <sys/cdefs.h> 42#include <sys/cdefs.h>
43__KERNEL_RCSID(0, "$NetBSD: i2c.c,v 1.48 2015/04/04 15:16:54 christos Exp $"); 43__KERNEL_RCSID(0, "$NetBSD: i2c.c,v 1.49 2015/04/13 22:26:20 pgoyette Exp $");
44 44
45#include <sys/param.h> 45#include <sys/param.h>
46#include <sys/systm.h> 46#include <sys/systm.h>
47#include <sys/device.h> 47#include <sys/device.h>
48#include <sys/event.h> 48#include <sys/event.h>
49#include <sys/conf.h> 49#include <sys/conf.h>
50#include <sys/malloc.h> 50#include <sys/malloc.h>
51#include <sys/kmem.h> 51#include <sys/kmem.h>
52#include <sys/kthread.h> 52#include <sys/kthread.h>
53#include <sys/proc.h> 53#include <sys/proc.h>
54#include <sys/kernel.h> 54#include <sys/kernel.h>
55#include <sys/fcntl.h> 55#include <sys/fcntl.h>
56#include <sys/module.h> 56#include <sys/module.h>
@@ -563,27 +563,27 @@ iic_ioctl(dev_t dev, u_long cmd, void *d @@ -563,27 +563,27 @@ iic_ioctl(dev_t dev, u_long cmd, void *d
563 563
564 switch (cmd) { 564 switch (cmd) {
565 case I2C_IOCTL_EXEC: 565 case I2C_IOCTL_EXEC:
566 return iic_ioctl_exec(sc, (i2c_ioctl_exec_t *)data, flag); 566 return iic_ioctl_exec(sc, (i2c_ioctl_exec_t *)data, flag);
567 default: 567 default:
568 return ENODEV; 568 return ENODEV;
569 } 569 }
570} 570}
571 571
572 572
573CFATTACH_DECL2_NEW(iic, sizeof(struct iic_softc), 573CFATTACH_DECL2_NEW(iic, sizeof(struct iic_softc),
574 iic_match, iic_attach, iic_detach, NULL, iic_rescan, iic_child_detach); 574 iic_match, iic_attach, iic_detach, NULL, iic_rescan, iic_child_detach);
575 575
576MODULE(MODULE_CLASS_DRIVER, iic, NULL); 576MODULE(MODULE_CLASS_DRIVER, iic, "i2cexec");
577 577
578#ifdef _MODULE 578#ifdef _MODULE
579#include "ioconf.c" 579#include "ioconf.c"
580#endif 580#endif
581 581
582static int 582static int
583iic_modcmd(modcmd_t cmd, void *opaque) 583iic_modcmd(modcmd_t cmd, void *opaque)
584{ 584{
585 int error; 585 int error;
586 586
587 error = 0; 587 error = 0;
588 switch (cmd) { 588 switch (cmd) {
589 case MODULE_CMD_INIT: 589 case MODULE_CMD_INIT: