]> git.baikalelectronics.ru Git - kernel.git/commit
staging: comedi: das16m1: tidy up the irq support in das16m1_attach()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 26 Nov 2013 23:41:43 +0000 (16:41 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Dec 2013 17:20:20 +0000 (09:20 -0800)
commitefbcf2182c91642edc13e894bdbf3daca944cd52
tree6824db990591f1680e4948a8bbabd2b1d2eb8d91
parent3a384fa63724cb49cbb3a79dd94324282d10daac
staging: comedi: das16m1: tidy up the irq support in das16m1_attach()

An irq is only needed by this driver in order to support async commands.
Since it is optional, modify the attach so that if an invalid irq is
selected by the user, or the request_irq() fails, the attach does not
fail.

Remove all the printk noise about the irq.

Only hookup the async command support if the request_irq() was successful.

Tidy up das16m1_irq_bits() a bit. This helper returns the value that needs
to be written to the DAS16M1_INTR_CONTROL register to setup the irq routing.

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/das16m1.c