gpiobus.c (294883) | gpiobus.c (295832) |
---|---|
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 294883 2016-01-27 02:23:54Z jhibbits $"); | 28__FBSDID("$FreeBSD: head/sys/dev/gpio/gpiobus.c 295832 2016-02-20 01:32:58Z jhibbits $"); |
29 30#include <sys/param.h> 31#include <sys/systm.h> 32#include <sys/bus.h> 33#include <sys/gpio.h> 34#include <sys/kernel.h> 35#include <sys/malloc.h> 36#include <sys/module.h> --- 474 unchanged lines hidden (view full) --- 511 struct gpiobus_softc *sc; 512 struct resource *rv; 513 struct resource_list *rl; 514 struct resource_list_entry *rle; 515 int isdefault; 516 517 if (type != SYS_RES_IRQ) 518 return (NULL); | 29 30#include <sys/param.h> 31#include <sys/systm.h> 32#include <sys/bus.h> 33#include <sys/gpio.h> 34#include <sys/kernel.h> 35#include <sys/malloc.h> 36#include <sys/module.h> --- 474 unchanged lines hidden (view full) --- 511 struct gpiobus_softc *sc; 512 struct resource *rv; 513 struct resource_list *rl; 514 struct resource_list_entry *rle; 515 int isdefault; 516 517 if (type != SYS_RES_IRQ) 518 return (NULL); |
519 isdefault = (start == 0UL && end == ~0UL && count == 1); | 519 isdefault = (RMAN_IS_DEFAULT_RANGE(start, end) && count == 1); |
520 rle = NULL; 521 if (isdefault) { 522 rl = BUS_GET_RESOURCE_LIST(bus, child); 523 if (rl == NULL) 524 return (NULL); 525 rle = resource_list_find(rl, type, *rid); 526 if (rle == NULL) 527 return (NULL); --- 264 unchanged lines hidden --- | 520 rle = NULL; 521 if (isdefault) { 522 rl = BUS_GET_RESOURCE_LIST(bus, child); 523 if (rl == NULL) 524 return (NULL); 525 rle = resource_list_find(rl, type, *rid); 526 if (rle == NULL) 527 return (NULL); --- 264 unchanged lines hidden --- |