On 2013-12-05 20:43, H Hartley Sweeten wrote:
The comedi subsystem only requires the drivers to support interrupts if one
or more of the subdevices support async commands. Since this is optional:
1) don't fail the attach if the irq is not available
2) only hookup the async command support if the irq is available
3) remove any async command init from subdevices that don't need it
4) remove any unnecessary sanity checks in the async command functions
Make use of the comedi_device 'read_subdev' and 'write_subdev' pointers
instead of accessing the dev->subdevices array directly with "magic" numbers
to the correct subdevice.
Also, remove any unnecessary debug noise associated with the irq requests.
This series was originally posted on 3 Dec 2013 as:
[PATCH 00/51] staging: comedi: cleanup irq requests
The first 17 patches of that series hare already been applied to Greg
Kroah-Hartman's staging tree. This series is a repost of the remaining
patches after addressing some issues pointed out by Ian Abbott.
H Hartley Sweeten (31):
staging: comedi: ni_at_2150: tidy up irq/dma request
staging: comedi: me4000: use dev->read_subdev
staging: comedi: me4000: refactor request_irq() during attach
staging: comedi: me4000: remove unnecessary check in the irq handler
staging: comedi: das1800: tidy up irq request
staging: comedi: das1800: use dev->read_subdev
staging: comedi: das16m1: remove unnecessary 'dev->irq' test
staging: comedi: adl_pci9111: fix incorrect irq passed to request_irq()
staging: comedi: adl_pci9111: the irq is only needed for async command
support
staging: comedi: dt2814: use dev->read_subdev
staging: comedi: dt282x: use dev->read_subdev
staging: comedi: dt282x: use dev->write_subdev
staging: comedi: amplc_pci230: tidy up irq request
staging: comedi: adl_pci9118: tidy up irq request
staging: comedi: adv_pci1710: only init async command members when needed
staging: comedi: adv_pci1710: use dev->read_subdev
staging: comedi: dt3000: don't fail attach if irq is not available
staging: comedi: dt3000: use dev->read_subdev
staging: comedi: s626: use dev->read_subdev
staging: comedi: hwrdv_apci3120: use dev->read_subdev
staging: comedi: hwrdv_apci3200: use dev->read_subdev
staging: comedi: adl_pci9118: use dev->read_subdev
staging: comedi: amplc_pc236: use dev->read_subdev
staging: comedi: amplc_pci224: use dev->write_subdev
staging: comedi: ni_65xx: use dev->read_subdev
staging: comedi: ni_atmio16d: use dev->read_subdev
staging: comedi: rtd520: use dev->read_subdev
staging: comedi: ni_pcidio: factor board reset out of attach
staging: comedi: ni_pcidio: use dev->read_subdev
staging: comedi: ni_pcidio: request_irq() before seting up subdevices
staging: comedi: multiq3: pass subdevice to encoder_reset()
.../comedi/drivers/addi-data/hwdrv_apci3120.c | 6 +-
.../comedi/drivers/addi-data/hwdrv_apci3200.c | 2 +-
drivers/staging/comedi/drivers/adl_pci9111.c | 31 ++++----
drivers/staging/comedi/drivers/adl_pci9118.c | 45 +++++------
drivers/staging/comedi/drivers/adv_pci1710.c | 10 +--
drivers/staging/comedi/drivers/amplc_pc236.c | 2 +-
drivers/staging/comedi/drivers/amplc_pci224.c | 2 +-
drivers/staging/comedi/drivers/amplc_pci230.c | 27 +++----
drivers/staging/comedi/drivers/das16m1.c | 5 --
drivers/staging/comedi/drivers/das1800.c | 88 ++++++++++------------
drivers/staging/comedi/drivers/dt2814.c | 4 +-
drivers/staging/comedi/drivers/dt282x.c | 10 +--
drivers/staging/comedi/drivers/dt3000.c | 29 +++----
drivers/staging/comedi/drivers/me4000.c | 37 ++++-----
drivers/staging/comedi/drivers/multiq3.c | 6 +-
drivers/staging/comedi/drivers/ni_65xx.c | 2 +-
drivers/staging/comedi/drivers/ni_at_a2150.c | 79 ++++++++-----------
drivers/staging/comedi/drivers/ni_atmio16d.c | 2 +-
drivers/staging/comedi/drivers/ni_pcidio.c | 64 +++++++++-------
drivers/staging/comedi/drivers/rtd520.c | 2 +-
drivers/staging/comedi/drivers/s626.c | 8 +-
21 files changed, 206 insertions(+), 255 deletions(-)
Patch 30 is still wrong. Patches 01 to 29 and 31 are fine (although I
have minor niggles with patch 01).
It is possible for Greg to apply everything except patch 30.
Reviewed-by: Ian Abbott <abbo...@mev.co.uk>
--
-=( Ian Abbott @ MEV Ltd. E-mail: <abbo...@mev.co.uk> )=-
-=( Tel: +44 (0)161 477 1898 FAX: +44 (0)161 718 3587 )=-
_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel