ofw_iicbus.c (227848) | ofw_iicbus.c (233018) |
---|---|
1/*- 2 * Copyright (c) 2009, Nathan Whitehorn <nwhitehorn@FreeBSD.org> 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 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2009, Nathan Whitehorn <nwhitehorn@FreeBSD.org> 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 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/sys/dev/ofw/ofw_iicbus.c 227848 2011-11-22 21:55:40Z marius $"); | 28__FBSDID("$FreeBSD: head/sys/dev/ofw/ofw_iicbus.c 233018 2012-03-15 22:53:39Z nwhitehorn $"); |
29 30#include <sys/param.h> 31#include <sys/bus.h> 32#include <sys/kernel.h> 33#include <sys/libkern.h> 34#include <sys/lock.h> 35#include <sys/module.h> 36#include <sys/mutex.h> --- 46 unchanged lines hidden (view full) --- 83DRIVER_MODULE(ofw_iicbus, iichb, ofw_iicbus_driver, ofwiicbus_devclass, 0, 0); 84MODULE_VERSION(ofw_iicbus, 1); 85MODULE_DEPEND(ofw_iicbus, iicbus, 1, 1, 1); 86 87static int 88ofw_iicbus_probe(device_t dev) 89{ 90 | 29 30#include <sys/param.h> 31#include <sys/bus.h> 32#include <sys/kernel.h> 33#include <sys/libkern.h> 34#include <sys/lock.h> 35#include <sys/module.h> 36#include <sys/mutex.h> --- 46 unchanged lines hidden (view full) --- 83DRIVER_MODULE(ofw_iicbus, iichb, ofw_iicbus_driver, ofwiicbus_devclass, 0, 0); 84MODULE_VERSION(ofw_iicbus, 1); 85MODULE_DEPEND(ofw_iicbus, iicbus, 1, 1, 1); 86 87static int 88ofw_iicbus_probe(device_t dev) 89{ 90 |
91 if (ofw_bus_get_node(dev) == 0) | 91 if (ofw_bus_get_node(dev) == -1) |
92 return (ENXIO); 93 device_set_desc(dev, "OFW I2C bus"); 94 95 return (0); 96} 97 98static int 99ofw_iicbus_attach(device_t dev) --- 88 unchanged lines hidden --- | 92 return (ENXIO); 93 device_set_desc(dev, "OFW I2C bus"); 94 95 return (0); 96} 97 98static int 99ofw_iicbus_attach(device_t dev) --- 88 unchanged lines hidden --- |