summaryrefslogtreecommitdiff
path: root/drivers/fmc
diff options
context:
space:
mode:
authorFederico Vaga <federico.vaga@cern.ch>2017-07-18 08:33:13 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-08-28 16:24:22 +0200
commit15b1b0f0d87e34a87172d9b83bd260543a991c2e (patch)
tree46565ee325ed50daa277a7d0baaad93181f87329 /drivers/fmc
parent2071a3e94abd34d65bd40f1ff845f9cea300dfa6 (diff)
downloadlinux-rpi-15b1b0f0d87e34a87172d9b83bd260543a991c2e.tar.gz
linux-rpi-15b1b0f0d87e34a87172d9b83bd260543a991c2e.tar.bz2
linux-rpi-15b1b0f0d87e34a87172d9b83bd260543a991c2e.zip
drivers/fmc: change registration prototype
Permit use of either fmc_device_register_n or fmc_device_register_n_gw depending on the type of device in use. Signed-off-by: Federico Vaga <federico.vaga@cern.ch> Tested-by: Pat Riehecky <riehecky@fnal.gov> Acked-by: Alessandro Rubini <rubini@gnudd.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/fmc')
-rw-r--r--drivers/fmc/fmc-core.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/fmc/fmc-core.c b/drivers/fmc/fmc-core.c
index ef6d8acb0a81..eabeac04ddda 100644
--- a/drivers/fmc/fmc-core.c
+++ b/drivers/fmc/fmc-core.c
@@ -199,7 +199,8 @@ EXPORT_SYMBOL(fmc_driver_unregister);
* When a device set is registered, all eeproms must be read
* and all FRUs must be parsed
*/
-int fmc_device_register_n(struct fmc_device **devs, int n)
+int fmc_device_register_n_gw(struct fmc_device **devs, int n,
+ struct fmc_gateware *gw)
{
struct fmc_device *fmc, **devarray;
uint32_t device_id;
@@ -313,8 +314,20 @@ out:
return ret;
}
+EXPORT_SYMBOL(fmc_device_register_n_gw);
+
+int fmc_device_register_n(struct fmc_device **devs, int n)
+{
+ return fmc_device_register_n_gw(devs, n, NULL);
+}
EXPORT_SYMBOL(fmc_device_register_n);
+int fmc_device_register_gw(struct fmc_device *fmc, struct fmc_gateware *gw)
+{
+ return fmc_device_register_n_gw(&fmc, 1, gw);
+}
+EXPORT_SYMBOL(fmc_device_register_gw);
+
int fmc_device_register(struct fmc_device *fmc)
{
return fmc_device_register_n(&fmc, 1);