diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2013-12-10 02:31:21 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-12-17 22:02:14 +0400 |
commit | 748cfd987bc93c7af88d19e206226a307a3e0b76 (patch) | |
tree | d3c9c04eb421cb92d045d55b506cd3f79c3344be /drivers/staging/comedi | |
parent | 23bafad0d12e4a6cc903d0955be359b9509dc5ca (diff) | |
download | linux-748cfd987bc93c7af88d19e206226a307a3e0b76.tar.xz |
staging: comedi: pcmmio: return '0' after successful attach
The comedi core expects the (*attach) functions to return < 0 to indicate
an error or >= 0 for success. Change the return to '0' as that is more
typical.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi')
-rw-r--r-- | drivers/staging/comedi/drivers/pcmmio.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/staging/comedi/drivers/pcmmio.c b/drivers/staging/comedi/drivers/pcmmio.c index f3cfe7b14adf..6fd79a7002ed 100644 --- a/drivers/staging/comedi/drivers/pcmmio.c +++ b/drivers/staging/comedi/drivers/pcmmio.c @@ -320,6 +320,7 @@ static void pcmmio_reset(struct comedi_device *dev) pcmmio_dio_write(dev, 0, PCMMIO_PAGE_INT_ID, 0); } +/* devpriv->spinlock is already locked */ static void pcmmio_stop_intr(struct comedi_device *dev, struct comedi_subdevice *s) { @@ -410,6 +411,7 @@ static irqreturn_t interrupt_pcmmio(int irq, void *d) return IRQ_HANDLED; } +/* devpriv->spinlock is already locked */ static int pcmmio_start_intr(struct comedi_device *dev, struct comedi_subdevice *s) { @@ -842,7 +844,7 @@ static int pcmmio_attach(struct comedi_device *dev, struct comedi_devconfig *it) s->insn_bits = pcmmio_dio_insn_bits; s->insn_config = pcmmio_dio_insn_config; - return 1; + return 0; } static struct comedi_driver pcmmio_driver = { |