summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH Hartley Sweeten <hartleys@visionengravers.com>2012-11-05 14:41:36 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-11-06 09:30:58 +0100
commit14696bbec450bbc13773a8a8f85577469435fa77 (patch)
treea2448b44a86d4c67110c089825efa7d30d264d56
parent6835a17a910cf68b500b7542f3eeea6c0f212ede (diff)
staging: comedi: addi_apci_1032: remove send_sig() use
The addi-data drivers use send_sig() to let the user know when an interrupt has occurred. The "standard" way to do this in the comedi subsystem is to have a subdevice that supports asynchronous commands and use comedi_event() to signal the user. Remove the send_sig() usage in this driver. This also allows removing the dev->private usage since tsk_Current was the only member still being used in the private data. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/comedi/drivers/addi_apci_1032.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/drivers/staging/comedi/drivers/addi_apci_1032.c b/drivers/staging/comedi/drivers/addi_apci_1032.c
index bdfc8854606f..5a300d93ce18 100644
--- a/drivers/staging/comedi/drivers/addi_apci_1032.c
+++ b/drivers/staging/comedi/drivers/addi_apci_1032.c
@@ -66,13 +66,10 @@ static int apci1032_intr_insn_config(struct comedi_device *dev,
struct comedi_insn *insn,
unsigned int *data)
{
- struct addi_private *devpriv = dev->private;
unsigned int ui_TmpValue;
unsigned int ul_Command1 = 0;
unsigned int ul_Command2 = 0;
- devpriv->tsk_Current = current;
-
/*******************************/
/* Set the digital input logic */
/*******************************/
@@ -108,7 +105,6 @@ static int apci1032_intr_insn_config(struct comedi_device *dev,
static irqreturn_t apci1032_interrupt(int irq, void *d)
{
struct comedi_device *dev = d;
- struct addi_private *devpriv = dev->private;
unsigned int ctrl;
/* disable the interrupt */
@@ -117,7 +113,6 @@ static irqreturn_t apci1032_interrupt(int irq, void *d)
ui_InterruptStatus = inl(dev->iobase + APCI1032_STATUS_REG);
ui_InterruptStatus = ui_InterruptStatus & 0X0000FFFF;
- send_sig(SIGIO, devpriv->tsk_Current, 0); /* send signal to the sample */
/* enable the interrupt */
outl(ctrl, dev->iobase + APCI1032_CTRL_REG);
@@ -151,17 +146,11 @@ static int apci1032_reset(struct comedi_device *dev)
static int apci1032_attach_pci(struct comedi_device *dev,
struct pci_dev *pcidev)
{
- struct addi_private *devpriv;
struct comedi_subdevice *s;
int ret;
dev->board_name = dev->driver->driver_name;
- devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL);
- if (!devpriv)
- return -ENOMEM;
- dev->private = devpriv;
-
ret = comedi_pci_enable(pcidev, dev->board_name);
if (ret)
return ret;
@@ -206,14 +195,11 @@ static int apci1032_attach_pci(struct comedi_device *dev,
static void apci1032_detach(struct comedi_device *dev)
{
struct pci_dev *pcidev = comedi_to_pci_dev(dev);
- struct addi_private *devpriv = dev->private;
- if (devpriv) {
- if (dev->iobase)
- apci1032_reset(dev);
- if (dev->irq)
- free_irq(dev->irq, dev);
- }
+ if (dev->iobase)
+ apci1032_reset(dev);
+ if (dev->irq)
+ free_irq(dev->irq, dev);
if (pcidev) {
if (dev->iobase)
comedi_pci_disable(pcidev);