blob: f6df4b1e9136376eb79050c8dfec3eaf20c62e7b [file] [log] [blame]
From bc7a2bbba9c8b7c26ced439dbcc163c6243b75d5 Mon Sep 17 00:00:00 2001
From: Alan Tull <atull@kernel.org>
Date: Wed, 15 Nov 2017 14:20:15 -0600
Subject: [PATCH 1664/1795] fpga: region: remove unneeded of_node_get and put
Remove of_node_get/put in fpga_region_get/put. Not
needed and will get in the way when I separate out
the common FPGA region code from Device Tree support
code.
Signed-off-by: Alan Tull <atull@kernel.org>
Acked-by: Moritz Fischer <mdf@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 08bcb4b1a7615762e1e2c87a5c8cc5d9709b60f6)
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
drivers/fpga/fpga-region.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/fpga/fpga-region.c b/drivers/fpga/fpga-region.c
index 1e4edac344ce..5741ad6af1d2 100644
--- a/drivers/fpga/fpga-region.c
+++ b/drivers/fpga/fpga-region.c
@@ -94,9 +94,7 @@ static struct fpga_region *fpga_region_get(struct fpga_region *region)
}
get_device(dev);
- of_node_get(dev->of_node);
if (!try_module_get(dev->parent->driver->owner)) {
- of_node_put(dev->of_node);
put_device(dev);
mutex_unlock(&region->mutex);
return ERR_PTR(-ENODEV);
@@ -119,7 +117,6 @@ static void fpga_region_put(struct fpga_region *region)
dev_dbg(dev, "put\n");
module_put(dev->parent->driver->owner);
- of_node_put(dev->of_node);
put_device(dev);
mutex_unlock(&region->mutex);
}
--
2.19.0