diff options
author | H Hartley Sweeten <hartleys@visionengravers.com> | 2012-09-24 16:24:12 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-09-26 12:37:31 -0400 |
commit | 8c7e4277c1197d31c0b34dbaf23e6edddb5978f7 (patch) | |
tree | fccd38d5a017f1dd9d111a2d13ffdd5983e38db6 | |
parent | b7047895b9c9deee0b0f4cb2a0a788c189f985f2 (diff) |
staging: comedi: s626: cleanup request_irq in s626_attach_pci()
Only set dev->irq if request_irq is successfull.
Remove the kernel message noise.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/comedi/drivers/s626.c | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/drivers/staging/comedi/drivers/s626.c b/drivers/staging/comedi/drivers/s626.c index 61bb8ab05786..4ad3f27b07c4 100644 --- a/drivers/staging/comedi/drivers/s626.c +++ b/drivers/staging/comedi/drivers/s626.c | |||
@@ -2503,25 +2503,18 @@ static int s626_attach_pci(struct comedi_device *dev, struct pci_dev *pcidev) | |||
2503 | if (ret) | 2503 | if (ret) |
2504 | return ret; | 2504 | return ret; |
2505 | 2505 | ||
2506 | ret = comedi_alloc_subdevices(dev, 6); | 2506 | if (pcidev->irq) { |
2507 | if (ret) | 2507 | ret = request_irq(pcidev->irq, s626_irq_handler, IRQF_SHARED, |
2508 | return ret; | ||
2509 | |||
2510 | dev->irq = pcidev->irq; | ||
2511 | |||
2512 | /* set up interrupt handler */ | ||
2513 | if (dev->irq == 0) { | ||
2514 | printk(KERN_ERR " unknown irq (bad)\n"); | ||
2515 | } else { | ||
2516 | ret = request_irq(dev->irq, s626_irq_handler, IRQF_SHARED, | ||
2517 | dev->board_name, dev); | 2508 | dev->board_name, dev); |
2518 | 2509 | ||
2519 | if (ret < 0) { | 2510 | if (ret == 0) |
2520 | printk(KERN_ERR " irq not available\n"); | 2511 | dev->irq = pcidev->irq; |
2521 | dev->irq = 0; | ||
2522 | } | ||
2523 | } | 2512 | } |
2524 | 2513 | ||
2514 | ret = comedi_alloc_subdevices(dev, 6); | ||
2515 | if (ret) | ||
2516 | return ret; | ||
2517 | |||
2525 | s = dev->subdevices + 0; | 2518 | s = dev->subdevices + 0; |
2526 | /* analog input subdevice */ | 2519 | /* analog input subdevice */ |
2527 | dev->read_subdev = s; | 2520 | dev->read_subdev = s; |