diff options
Diffstat (limited to 'drivers/amba')
-rw-r--r-- | drivers/amba/bus.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c index 09e72967b8..a24c152bfa 100644 --- a/drivers/amba/bus.c +++ b/drivers/amba/bus.c @@ -18,6 +18,7 @@ #include <linux/limits.h> #include <linux/clk/clk-conf.h> #include <linux/platform_device.h> +#include <linux/property.h> #include <linux/reset.h> #include <linux/of_irq.h> #include <linux/of_device.h> @@ -528,7 +529,7 @@ static void amba_device_release(struct device *dev) { struct amba_device *d = to_amba_device(dev); - of_node_put(d->dev.of_node); + fwnode_handle_put(dev_fwnode(&d->dev)); if (d->res.parent) release_resource(&d->res); mutex_destroy(&d->periphid_lock); @@ -548,6 +549,8 @@ int amba_device_add(struct amba_device *dev, struct resource *parent) { int ret; + fwnode_handle_get(dev_fwnode(&dev->dev)); + ret = request_resource(parent, &dev->res); if (ret) return ret; |