Commit 79fa5ba7 authored by Federico Vaga's avatar Federico Vaga

kernel: if SVEC is not necessary, use VIC structure

Make the VIC code indipendently as much as possible
Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent f1469cf0
...@@ -98,16 +98,15 @@ static int svec_vic_init(struct svec_dev *svec, struct fmc_device *fmc) ...@@ -98,16 +98,15 @@ static int svec_vic_init(struct svec_dev *svec, struct fmc_device *fmc)
return 0; return 0;
} }
void svec_vic_exit(struct svec_dev *svec) void svec_vic_exit(struct vic_irq_controller *vic)
{ {
if (!svec->vic) if (!vic)
return; return;
/* Disable all irq lines and the VIC in general */ /* Disable all irq lines and the VIC in general */
vic_writel(svec->vic, 0xffffffff, VIC_REG_IDR); vic_writel(vic, 0xffffffff, VIC_REG_IDR);
vic_writel(svec->vic, 0, VIC_REG_CTL); vic_writel(vic, 0, VIC_REG_CTL);
kfree(svec->vic); kfree(vic);
svec->vic = NULL;
} }
irqreturn_t svec_vic_irq_dispatch(struct svec_dev * svec) irqreturn_t svec_vic_irq_dispatch(struct svec_dev * svec)
...@@ -214,7 +213,7 @@ int svec_vic_irq_free(struct svec_dev *svec, unsigned long id) ...@@ -214,7 +213,7 @@ int svec_vic_irq_free(struct svec_dev *svec, unsigned long id)
/* Clean up the VIC if there are no more handlers */ /* Clean up the VIC if there are no more handlers */
if (!vic_handler_count(svec->vic)) { if (!vic_handler_count(svec->vic)) {
svec_vic_exit(svec); svec_vic_exit(svec->vic);
svec->vic = NULL; svec->vic = NULL;
} }
......
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