fpga: bridge: support getting bridge from device
authorAlan Tull <atull@kernel.org>
Wed, 15 Nov 2017 20:20:11 +0000 (14:20 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Nov 2017 15:30:36 +0000 (16:30 +0100)
commit9c1c4b2753fea36a072e78a5efc82fca0d13b455
treedfac82fbde45ad1a5fd62aef49b82bf995509d14
parent4fbd8d194f06c8a3fd2af1ce560ddb31f7ec8323
fpga: bridge: support getting bridge from device

Add two functions for getting the FPGA bridge from the device
rather than device tree node.  This is to enable writing code
that will support using FPGA bridges without device tree.
Rename one old function to make it clear that it is device
tree-ish.  This leaves us with 3 functions for getting a bridge:

* fpga_bridge_get
  Get the bridge given the device.

* fpga_bridges_get_to_list
  Given the device, get the bridge and add it to a list.

* of_fpga_bridges_get_to_list
  Renamed from priviously existing fpga_bridges_get_to_list.
  Given the device node, get the bridge and add it to a list.

Signed-off-by: Alan Tull <atull@kernel.org>
Acked-by: Moritz Fischer <mdf@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/fpga/fpga-bridge.c
drivers/fpga/fpga-region.c
include/linux/fpga/fpga-bridge.h