Move this function from hwdrv_apci1032.c. Remove the unnecessary comment and rename the CamelCase function to apci1032_reset(). Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx> Cc: Ian Abbott <abbotti@xxxxxxxxx> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- .../comedi/drivers/addi-data/hwdrv_apci1032.c | 28 ---------------------- drivers/staging/comedi/drivers/addi_apci_1032.c | 17 +++++++++++-- 2 files changed, 15 insertions(+), 30 deletions(-) diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1032.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1032.c index 767392a..337a46e 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1032.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1032.c @@ -278,31 +278,3 @@ static void v_APCI1032_Interrupt(int irq, void *d) outl(ui_Temp, dev->iobase + APCI1032_CTRL_REG); return; } - -/* -+----------------------------------------------------------------------------+ -| Function Name : int i_APCI1032_Reset(struct comedi_device *dev) | | -+----------------------------------------------------------------------------+ -| Task :resets all the registers | -+----------------------------------------------------------------------------+ -| Input Parameters : struct comedi_device *dev -+----------------------------------------------------------------------------+ -| Output Parameters : -- | -+----------------------------------------------------------------------------+ -| Return Value : | -| | -+----------------------------------------------------------------------------+ -*/ - -static int i_APCI1032_Reset(struct comedi_device *dev) -{ - /* disable the interrupts */ - outl(0x0, dev->iobase + APCI1032_CTRL_REG); - /* Reset the interrupt status register */ - inl(dev->iobase + APCI1032_STATUS_REG); - /* Disable the and/or interrupt */ - outl(0x0, dev->iobase + APCI1032_MODE1_REG); - outl(0x0, dev->iobase + APCI1032_MODE2_REG); - - return 0; -} diff --git a/drivers/staging/comedi/drivers/addi_apci_1032.c b/drivers/staging/comedi/drivers/addi_apci_1032.c index 45b2548..717e122 100644 --- a/drivers/staging/comedi/drivers/addi_apci_1032.c +++ b/drivers/staging/comedi/drivers/addi_apci_1032.c @@ -12,6 +12,19 @@ static irqreturn_t v_ADDI_Interrupt(int irq, void *d) return IRQ_RETVAL(1); } +static int apci1032_reset(struct comedi_device *dev) +{ + /* disable the interrupts */ + outl(0x0, dev->iobase + APCI1032_CTRL_REG); + /* Reset the interrupt status register */ + inl(dev->iobase + APCI1032_STATUS_REG); + /* Disable the and/or interrupt */ + outl(0x0, dev->iobase + APCI1032_MODE1_REG); + outl(0x0, dev->iobase + APCI1032_MODE2_REG); + + return 0; +} + static int apci1032_attach_pci(struct comedi_device *dev, struct pci_dev *pcidev) { @@ -80,7 +93,7 @@ static int apci1032_attach_pci(struct comedi_device *dev, s = &dev->subdevices[6]; s->type = COMEDI_SUBD_UNUSED; - i_APCI1032_Reset(dev); + apci1032_reset(dev); return 0; } @@ -91,7 +104,7 @@ static void apci1032_detach(struct comedi_device *dev) if (devpriv) { if (dev->iobase) - i_APCI1032_Reset(dev); + apci1032_reset(dev); if (dev->irq) free_irq(dev->irq, dev); } -- 1.7.11 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel