Deleted Added
full compact
iicbus.c (209800) iicbus.c (212413)
1/*-
2 * Copyright (c) 1998, 2001 Nicolas Souchu
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1998, 2001 Nicolas Souchu
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/sys/dev/iicbus/iicbus.c 209800 2010-07-08 14:19:52Z nwhitehorn $");
28__FBSDID("$FreeBSD: head/sys/dev/iicbus/iicbus.c 212413 2010-09-10 11:19:03Z avg $");
29
30/*
31 * Autoconfiguration and support routines for the Philips serial I2C bus
32 */
33
34#include <sys/param.h>
35#include <sys/systm.h>
36#include <sys/kernel.h>

--- 146 unchanged lines hidden (view full) ---

183 case IICBUS_IVAR_ADDR:
184 *result = devi->addr;
185 break;
186 }
187 return (0);
188}
189
190static device_t
29
30/*
31 * Autoconfiguration and support routines for the Philips serial I2C bus
32 */
33
34#include <sys/param.h>
35#include <sys/systm.h>
36#include <sys/kernel.h>

--- 146 unchanged lines hidden (view full) ---

183 case IICBUS_IVAR_ADDR:
184 *result = devi->addr;
185 break;
186 }
187 return (0);
188}
189
190static device_t
191iicbus_add_child(device_t dev, int order, const char *name, int unit)
191iicbus_add_child(device_t dev, u_int order, const char *name, int unit)
192{
193 device_t child;
194 struct iicbus_ivar *devi;
195
196 child = device_add_child_ordered(dev, order, name, unit);
197 if (child == NULL)
198 return (child);
199 devi = malloc(sizeof(struct iicbus_ivar), M_DEVBUF, M_NOWAIT | M_ZERO);

--- 73 unchanged lines hidden ---
192{
193 device_t child;
194 struct iicbus_ivar *devi;
195
196 child = device_add_child_ordered(dev, order, name, unit);
197 if (child == NULL)
198 return (child);
199 devi = malloc(sizeof(struct iicbus_ivar), M_DEVBUF, M_NOWAIT | M_ZERO);

--- 73 unchanged lines hidden ---