diff --git a/sys/kern/subr_rman.c b/sys/kern/subr_rman.c index 544603968336..56c0979b14ba 100644 --- a/sys/kern/subr_rman.c +++ b/sys/kern/subr_rman.c @@ -685,3 +685,9 @@ rman_get_rid(struct resource *r) { return (r->r_rid); } + +struct device * +rman_get_device(struct resource *r) +{ + return (r->r_dev); +} diff --git a/sys/sys/rman.h b/sys/sys/rman.h index 40fe3074601e..6bec626115f7 100644 --- a/sys/sys/rman.h +++ b/sys/sys/rman.h @@ -134,6 +134,7 @@ uint32_t rman_make_alignment_flags(uint32_t size); u_long rman_get_start(struct resource *_r); u_long rman_get_end(struct resource *_r); +struct device *rman_get_device(struct resource *); u_long rman_get_size(struct resource *_r); u_int rman_get_flags(struct resource *_r); void rman_set_virtual(struct resource *_r, void *_v);