iicbus.c (289656) | iicbus.c (289657) |
---|---|
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 289656 2015-10-20 19:47:08Z dumbbell $"); | 28__FBSDID("$FreeBSD: head/sys/dev/iicbus/iicbus.c 289657 2015-10-20 19:52:59Z dumbbell $"); |
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> --- 93 unchanged lines hidden (view full) --- 130 131static int 132iicbus_detach(device_t dev) 133{ 134 struct iicbus_softc *sc = IICBUS_SOFTC(dev); 135 136 iicbus_reset(dev, IIC_FASTEST, 0, NULL); 137 bus_generic_detach(dev); | 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> --- 93 unchanged lines hidden (view full) --- 130 131static int 132iicbus_detach(device_t dev) 133{ 134 struct iicbus_softc *sc = IICBUS_SOFTC(dev); 135 136 iicbus_reset(dev, IIC_FASTEST, 0, NULL); 137 bus_generic_detach(dev); |
138 device_delete_children(dev); |
|
138 mtx_destroy(&sc->lock); 139 return (0); 140} 141 142static int 143iicbus_print_child(device_t dev, device_t child) 144{ 145 struct iicbus_ivar *devi = IICBUS_IVAR(child); --- 205 unchanged lines hidden --- | 139 mtx_destroy(&sc->lock); 140 return (0); 141} 142 143static int 144iicbus_print_child(device_t dev, device_t child) 145{ 146 struct iicbus_ivar *devi = IICBUS_IVAR(child); --- 205 unchanged lines hidden --- |