Commit 4ddf8e04 authored by Federico Vaga's avatar Federico Vaga

kernel: use fmc helpers instead of direct calls

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent b39e6473
......@@ -432,7 +432,7 @@ int fa_probe(struct fmc_device *fmc)
char *fwname;
/* Validate the new FMC device */
i = fmc->op->validate(fmc, &fa_dev_drv);
i = fmc_validate(fmc, &fa_dev_drv);
if (i < 0) {
dev_info(&fmc->dev, "not using \"%s\" according to "
"modparam\n", KBUILD_MODNAME);
......
......@@ -300,7 +300,7 @@ end:
}
/* ack the irq */
fa->fmc->op->irq_ack(fa->fmc);
fmc_irq_ack(fa->fmc);
}
/*
......@@ -382,12 +382,12 @@ irqreturn_t fa_irq_handler(int irq_core_base, void *dev_id)
/* check right IRQ seq.: ACQ_END followed by DMA_END */
fa->last_irq_core_src = irq_core_base;
} else /* current Acquiistion has been stopped */
fmc->op->irq_ack(fmc);
fmc_irq_ack(fmc);
} else { /* unexpected interrupt we have to ack anyway */
dev_err(&fa->fmc->dev,
"%s unexpected interrupt 0x%x\n",
__func__, status);
fmc->op->irq_ack(fmc);
fmc_irq_ack(fmc);
}
return IRQ_HANDLED;
......@@ -415,9 +415,9 @@ int fa_setup_irqs(struct fa_dev *fa)
* is to set it by means of the field irq provided by the fmc device
*/
fmc->irq = fa->fa_irq_adc_base;
err = fmc->op->irq_request(fmc, fa_irq_handler,
"fmc-adc-100m14b",
0 /*VIC is used */);
err = fmc_irq_request(fmc, fa_irq_handler,
"fmc-adc-100m14b",
0 /*VIC is used */);
if (err) {
dev_err(&fa->fmc->dev, "can't request irq %i (error %i)\n",
fa->fmc->irq, err);
......@@ -445,7 +445,7 @@ int fa_free_irqs(struct fa_dev *fa)
/* Release ADC IRQs */
fmc->irq = fa->fa_irq_adc_base;
fmc->op->irq_free(fmc);
fmc_irq_free(fmc);
return 0;
}
......
......@@ -126,14 +126,14 @@ static int fa_spec_setup_irqs(struct fa_dev *fa)
* is to set it by means of the field irq provided by the fmc device
*/
fmc->irq = spec_data->fa_irq_dma_base;
err = fmc->op->irq_request(fmc, fa_spec_irq_handler,
"fmc-adc-100m14b", 0);
err = fmc_irq_request(fmc, fa_spec_irq_handler,
"fmc-adc-100m14b", 0);
if (err) {
dev_err(&fmc->dev, "can't request irq 0x%x (error %i)\n",
fmc->irq, err);
return err;
}
fmc->op->gpio_config(fmc, fa_gpio_on, ARRAY_SIZE(fa_gpio_on));
fmc_gpio_config(fmc, fa_gpio_on, ARRAY_SIZE(fa_gpio_on));
dev_info(&fmc->dev, "spec::%s successfully executed\n", __func__);
/* Add SPEC specific IRQ sources to listen */
......@@ -149,9 +149,9 @@ static int fa_spec_free_irqs(struct fa_dev *fa)
/* Release DMA IRQs */
fmc->irq = spec_data->fa_irq_dma_base;
fmc->op->irq_free(fmc);
fmc_irq_free(fmc);
fmc->op->gpio_config(fmc, fa_gpio_off, ARRAY_SIZE(fa_gpio_off));
fmc_gpio_config(fmc, fa_gpio_off, ARRAY_SIZE(fa_gpio_off));
return 0;
}
......
......@@ -116,7 +116,7 @@ out:
spin_unlock(&cset->lock);
/* ack the irq */
fa->fmc->op->irq_ack(fa->fmc);
fmc_irq_ack(fa->fmc);
return IRQ_HANDLED;
}
......
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