staging: comedi: pcmmio: tidy up the irq request
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 9 Dec 2013 22:30:51 +0000 (15:30 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Dec 2013 18:02:12 +0000 (10:02 -0800)
commit6e6bed0b523717aa93f08ce8fe679a5c48c81cfd
treeab8f748ec8ef072a1152d1ff967eae61b5f358dd
parent5d4997bbfa3bb7ed4786bd96bfcc756b02f9551a
staging: comedi: pcmmio: tidy up the irq request

The for () loop that does the request_irq() in this driver is a bit of
an overkill. The code appears to have been copied from the pcmuio driver
which supports boards with 1 or 2 ASIC devices. The board supported by
this driver only has 1 ASIC.

Simplify the code and store the irq number in the comedi_device. This
allows the core to automatically do the free_irq() when the driver is
detached.

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>
drivers/staging/comedi/drivers/pcmmio.c