Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6c76d4e7 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman
Browse files

staging: comedi: addi_common.c: remove v_ADDI_Interrupt()



The addi_apci_035 and addi_apci_1500 are the only drivers left that use
this function in addi_common.c. The function simply calls the 'interrupt'
function that is in the boardinfo of the driver. Both drivers use the
same 'interrupt' function for all boardnfo entries.

Remove the i_ADDI_Reset() function as well as the 'interrupt' boardinfo
and use the 'interrupt' function directly when doing the request_irq().

In addition, the addi_apci_3120 driver has a private v_ADDI_Interrupt()
function that is doing the same thing. Remove that one as well.

Fix the return type of 'interrupt' functions in the drivers and add the
return vaules.

Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3c3dcdd7
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -55,12 +55,3 @@ static int i_ADDIDATA_InsnReadEeprom(struct comedi_device *dev,

	return insn->n;
}

static irqreturn_t v_ADDI_Interrupt(int irq, void *d)
{
	struct comedi_device *dev = d;
	const struct addi_board *this_board = dev->board_ptr;

	this_board->interrupt(irq, d);
	return IRQ_RETVAL(1);
}
+3 −1
Original line number Diff line number Diff line
@@ -434,7 +434,7 @@ static int apci035_reset(struct comedi_device *dev)
	return 0;
}

static void apci035_interrupt(int irq, void *d)
static irqreturn_t apci035_interrupt(int irq, void *d)
{
	struct comedi_device *dev = d;
	struct addi_private *devpriv = dev->private;
@@ -477,4 +477,6 @@ static void apci035_interrupt(int irq, void *d)
		/*  send signal to the sample */
		send_sig(SIGIO, devpriv->tsk_Current, 0);
	}

	return IRQ_HANDLED;
}
+3 −1
Original line number Diff line number Diff line
@@ -2011,7 +2011,7 @@ static int apci1500_do_bits(struct comedi_device *dev,
	return insn->n;
}

static void apci1500_interrupt(int irq, void *d)
static irqreturn_t apci1500_interrupt(int irq, void *d)
{

	struct comedi_device *dev = d;
@@ -2180,6 +2180,8 @@ static void apci1500_interrupt(int irq, void *d)
			"Interrupt from unknown source\n");

	}

	return IRQ_HANDLED;
}

static int apci1500_reset(struct comedi_device *dev)
+4 −2
Original line number Diff line number Diff line
@@ -1415,7 +1415,7 @@ static int apci3120_interrupt_handle_eos(struct comedi_device *dev)
	return 0;
}

static void apci3120_interrupt(int irq, void *d)
static irqreturn_t apci3120_interrupt(int irq, void *d)
{
	struct comedi_device *dev = d;
	struct addi_private *devpriv = dev->private;
@@ -1432,7 +1432,7 @@ static void apci3120_interrupt(int irq, void *d)

	if ((!int_daq) && (!(int_amcc & ANY_S593X_INT))) {
		dev_err(dev->class_dev, "IRQ from unknown source\n");
		return;
		return IRQ_NONE;
	}

	outl(int_amcc | 0x00ff0000, devpriv->i_IobaseAmcc + AMCC_OP_REG_INTCSR);	/*  shutdown IRQ reasons in AMCC */
@@ -1587,6 +1587,8 @@ static void apci3120_interrupt(int irq, void *d)

	}
	comedi_handle_events(dev, s);

	return IRQ_HANDLED;
}

/*
+1 −2
Original line number Diff line number Diff line
@@ -27,7 +27,6 @@ static const struct addi_board apci035_boardtypes[] = {
		.i_Timer		= 1,
		.ui_MinAcquisitiontimeNs = 10000,
		.ui_MinDelaytimeNs	= 100000,
		.interrupt		= apci035_interrupt,
		.ai_config		= apci035_ai_config,
		.ai_read		= apci035_ai_read,
		.timer_config		= apci035_timer_config,
@@ -84,7 +83,7 @@ static int apci035_auto_attach(struct comedi_device *dev,
	/* ## */

	if (pcidev->irq > 0) {
		ret = request_irq(pcidev->irq, v_ADDI_Interrupt, IRQF_SHARED,
		ret = request_irq(pcidev->irq, apci035_interrupt, IRQF_SHARED,
				  dev->board_name, dev);
		if (ret == 0)
			dev->irq = pcidev->irq;
Loading