From bdffb39f34bd7a9d4551675f2e9af3b813234964 Mon Sep 17 00:00:00 2001 From: Nate Lawson Date: Wed, 17 Mar 2004 17:40:34 +0000 Subject: Add bus_alloc_resource_any(9), which does bus_alloc_resource() with the appropriate default values. Document it in the manpage. Submitted by: Mark Santcroos Reviewed by: imp, dfr, bde Abstains: bde --- sys/sys/bus.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sys') diff --git a/sys/sys/bus.h b/sys/sys/bus.h index 79d4d15764a44..ff260ed54cd69 100644 --- a/sys/sys/bus.h +++ b/sys/sys/bus.h @@ -309,6 +309,12 @@ int bus_child_present(device_t child); int bus_child_pnpinfo_str(device_t child, char *buf, size_t buflen); int bus_child_location_str(device_t child, char *buf, size_t buflen); +static __inline struct resource * +bus_alloc_resource_any(device_t dev, int type, int *rid, u_int flags) +{ + return (bus_alloc_resource(dev, type, rid, 0ul, ~0ul, 1, flags)); +} + /* * Access functions for device. */ -- cgit v1.2.3