gpiobus.c (298738) | gpiobus.c (298739) |
---|---|
1/*- 2 * Copyright (c) 2009 Oleksandr Tymoshenko <gonzo@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 * 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) 2009 Oleksandr Tymoshenko <gonzo@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 * 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/gpio/gpiobus.c 298738 2016-04-28 12:03:22Z mmel $"); | 28__FBSDID("$FreeBSD: head/sys/dev/gpio/gpiobus.c 298739 2016-04-28 12:04:12Z mmel $"); |
29 30#include <sys/param.h> 31#include <sys/systm.h> 32#include <sys/bus.h> 33#include <sys/gpio.h> 34#include <sys/intr.h> 35#include <sys/kernel.h> 36#include <sys/malloc.h> --- 48 unchanged lines hidden (view full) --- 85{ 86 u_int irqnum; 87 88 /* 89 * Allocate new fictitious interrupt number and store configuration 90 * into it. 91 */ 92 irqnum = intr_gpio_map_irq(pin->dev, pin->pin, pin->flags, intr_mode); | 29 30#include <sys/param.h> 31#include <sys/systm.h> 32#include <sys/bus.h> 33#include <sys/gpio.h> 34#include <sys/intr.h> 35#include <sys/kernel.h> 36#include <sys/malloc.h> --- 48 unchanged lines hidden (view full) --- 85{ 86 u_int irqnum; 87 88 /* 89 * Allocate new fictitious interrupt number and store configuration 90 * into it. 91 */ 92 irqnum = intr_gpio_map_irq(pin->dev, pin->pin, pin->flags, intr_mode); |
93 if (irqnum == 0xFFFFFFFF) | 93 if (irqnum == INTR_IRQ_INVALID) |
94 return (NULL); 95 96 return (bus_alloc_resource(consumer_dev, SYS_RES_IRQ, rid, 97 irqnum, irqnum, 1, alloc_flags)); 98} 99#endif 100 101int --- 716 unchanged lines hidden --- | 94 return (NULL); 95 96 return (bus_alloc_resource(consumer_dev, SYS_RES_IRQ, rid, 97 irqnum, irqnum, 1, alloc_flags)); 98} 99#endif 100 101int --- 716 unchanged lines hidden --- |