Commit 907b342a authored by Federico Vaga's avatar Federico Vaga

fa-core.c: use FMC_PARAM_BUSID() in the ADC driver

Signed-off-by: 's avatarFederico Vaga <federico.vaga@gmail.com>
parent 70ed4d5f
......@@ -16,6 +16,8 @@
#include "fmc-adc.h"
static struct fmc_driver fa_dev_drv;
FMC_PARAM_BUSID(fa_dev_drv);
static char *fa_binaries = FA_GATEWARE_DEFAULT_NAME;
module_param_named(file, fa_binaries, charp, 0444);
......@@ -39,6 +41,14 @@ int fa_probe(struct fmc_device *fmc)
struct fa_dev *fa;
int err, i = 0;
/* Validate the new FMC device */
i = fmc->op->validate(fmc, &fa_dev_drv);
if (i < 0) {
dev_info(fmc->hwdev, "not using \"%s\" according to "
"modparam\n", KBUILD_MODNAME);
return -ENODEV;
}
pr_info("%s:%d\n", __func__, __LINE__);
/* Driver data */
fa = devm_kzalloc(&fmc->dev, sizeof(struct fa_dev), GFP_KERNEL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment