summaryrefslogtreecommitdiffstats
path: root/sys/arm64
diff options
context:
space:
mode:
authorzbb <zbb@FreeBSD.org>2016-01-28 15:38:02 +0000
committerzbb <zbb@FreeBSD.org>2016-01-28 15:38:02 +0000
commit0f04b1d51e13d3825e8e209609a2d691453625f9 (patch)
tree5973350bc7ea93f165eefa6e8d90b702953112ac /sys/arm64
parenta4a7f925b592154694c3994b89ac838eb07592cf (diff)
downloadFreeBSD-src-0f04b1d51e13d3825e8e209609a2d691453625f9.zip
FreeBSD-src-0f04b1d51e13d3825e8e209609a2d691453625f9.tar.gz
Correct alloc_ and release_resource methods in thunder_pcie driver
- Avoid using BUS_ macros as bus_generic_ functions should be used instead. - Fix mistaken device_t pointers in thunder_pcie_alloc_resource. Should use dev->parent method and allocate resource for child device Reviewed by: wma Obtained from: Semihalf Sponsored by: Cavium Differential Revision: https://reviews.freebsd.org/D5068
Diffstat (limited to 'sys/arm64')
-rw-r--r--sys/arm64/cavium/thunder_pcie.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arm64/cavium/thunder_pcie.c b/sys/arm64/cavium/thunder_pcie.c
index 5de3398..b047639 100644
--- a/sys/arm64/cavium/thunder_pcie.c
+++ b/sys/arm64/cavium/thunder_pcie.c
@@ -268,7 +268,7 @@ thunder_pcie_release_resource(device_t dev, device_t child, int type, int rid,
{
if (type != SYS_RES_MEMORY)
- return (BUS_RELEASE_RESOURCE(device_get_parent(dev), child,
+ return (bus_generic_release_resource(dev, child,
type, rid, res));
return (rman_release_resource(res));
@@ -291,7 +291,7 @@ thunder_pcie_alloc_resource(device_t dev, device_t child, int type, int *rid,
rm = &sc->mem_rman;
break;
default:
- return (BUS_ALLOC_RESOURCE(device_get_parent(dev), dev,
+ return (bus_generic_alloc_resource(dev, child,
type, rid, start, end, count, flags));
};
OpenPOWER on IntegriCloud