aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/pccard
diff options
context:
space:
mode:
authorJustin Hibbits <jhibbits@FreeBSD.org>2016-02-20 01:32:58 +0000
committerJustin Hibbits <jhibbits@FreeBSD.org>2016-02-20 01:32:58 +0000
commit7915adb56014e31e8ed8a4418060625c2e223fc0 (patch)
tree1d99680c416ab999716f7e3fb78956be8804e81f /sys/dev/pccard
parent2bc4747cc49351d47d2bdacd5c5d82bf4b44474b (diff)
downloadsrc-7915adb56014e31e8ed8a4418060625c2e223fc0.tar.gz
src-7915adb56014e31e8ed8a4418060625c2e223fc0.zip
Introduce a RMAN_IS_DEFAULT_RANGE() macro, and use it.
This simplifies checking for default resource range for bus_alloc_resource(), and improves readability. This is part of, and related to, the migration of rman_res_t from u_long to uintmax_t. Discussed with: jhb Suggested by: marcel
Notes
Notes: svn path=/head/; revision=295832
Diffstat (limited to 'sys/dev/pccard')
-rw-r--r--sys/dev/pccard/pccard.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/pccard/pccard.c b/sys/dev/pccard/pccard.c
index b3c2e32e61eb..746b50947d92 100644
--- a/sys/dev/pccard/pccard.c
+++ b/sys/dev/pccard/pccard.c
@@ -1137,7 +1137,7 @@ pccard_alloc_resource(device_t dev, device_t child, int type, int *rid,
struct pccard_ivar *dinfo;
struct resource_list_entry *rle = 0;
int passthrough = (device_get_parent(child) != dev);
- int isdefault = (start == 0 && end == ~0UL && count == 1);
+ int isdefault = (RMAN_IS_DEFAULT_RANGE(start, end) && count == 1);
struct resource *r = NULL;
/* XXX I'm no longer sure this is right */