diff options
author | Alan Tull <atull@kernel.org> | 2017-11-15 15:20:15 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-11-28 10:30:37 -0500 |
commit | 08bcb4b1a7615762e1e2c87a5c8cc5d9709b60f6 (patch) | |
tree | 01e4e1a0d4784463cd5602fdbc076b8684740fb4 /drivers/fpga/fpga-region.c | |
parent | c3d971ad32fc19af638ac6f6ffe041aa1ff722b5 (diff) |
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>
Diffstat (limited to 'drivers/fpga/fpga-region.c')
-rw-r--r-- | drivers/fpga/fpga-region.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/fpga/fpga-region.c b/drivers/fpga/fpga-region.c index 6b4f9abed043..352661fc6b14 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) | |||
94 | } | 94 | } |
95 | 95 | ||
96 | get_device(dev); | 96 | get_device(dev); |
97 | of_node_get(dev->of_node); | ||
98 | if (!try_module_get(dev->parent->driver->owner)) { | 97 | if (!try_module_get(dev->parent->driver->owner)) { |
99 | of_node_put(dev->of_node); | ||
100 | put_device(dev); | 98 | put_device(dev); |
101 | mutex_unlock(®ion->mutex); | 99 | mutex_unlock(®ion->mutex); |
102 | return ERR_PTR(-ENODEV); | 100 | return ERR_PTR(-ENODEV); |
@@ -119,7 +117,6 @@ static void fpga_region_put(struct fpga_region *region) | |||
119 | dev_dbg(dev, "put\n"); | 117 | dev_dbg(dev, "put\n"); |
120 | 118 | ||
121 | module_put(dev->parent->driver->owner); | 119 | module_put(dev->parent->driver->owner); |
122 | of_node_put(dev->of_node); | ||
123 | put_device(dev); | 120 | put_device(dev); |
124 | mutex_unlock(®ion->mutex); | 121 | mutex_unlock(®ion->mutex); |
125 | } | 122 | } |