]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit - drivers/fpga/fpga-mgr.c
fpga manager: ensure lifetime with of_fpga_mgr_get
authorAlan Tull <atull@opensource.altera.com>
Thu, 22 Oct 2015 17:38:37 +0000 (12:38 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Oct 2015 23:49:44 +0000 (16:49 -0700)
commit654ba4cc0f3ed7c0f08bfb39f66059d8c42943ee
tree0afa1399bea345e12cf72ffac476190f27562275
parent4d10eaff5bfc69997a769f9c83b749f0a8c542fa
fpga manager: ensure lifetime with of_fpga_mgr_get

Ensure device and driver lifetime from of_fpga_mgr_get() to
fpga_mgr_put().

* Don't put_device() in of_fpga_mgr_get, do it in fpga_mgr_put().
  (still do put_device if there is an error).
* Do module_get on the low level driver.
* Don't need to module_get(THIS_MODULE) since we won't be allowed
  to unload the fpga manager core without unloading low level
  driver first.
* Remove unnedessary null check for node pointer.

Signed-off-by: Alan Tull <atull@opensource.altera.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/fpga/fpga-mgr.c