[PATCH 00/51] staging: comedi: cleanup irq requests

Ian Abbott abbotti at mev.co.uk
Wed Dec 4 11:46:48 UTC 2013


On 2013-12-03 19:07, 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.
>
> H Hartley Sweeten (51):
>    staging: comedi: s626: fix async command hookup
>    staging: comedi: pcl816: remove 'irq_free' from private data
>    staging: comedi: pcl816: only init command support if irq is available
>    staging: comedi: pcl816: remove 'sub_ai' from private data
>    staging: comedi: pcl816: use dev->read_subdev
>    staging: comedi: pcl818: remove 'irq_free' from private data
>    staging: comedi: pcl818: remove unnecessary 'dev->irq' tests
>    staging: comedi: pcl818: remove function trace noise
>    staging: comedi: pcl818: only init async command members when needed
>    staging: comedi: pcl818: remove 'sub_ai' from private data
>    staging: comedi: pcl818: use dev->read_subdev
>    staging: comedi: pcl818: remove unnecessary s->len_chanlist init
>    staging: comedi: pcl812: remove unnecessary s->len_chanlist init
>    staging: comedi: pcl812: only init async command members when needed
>    staging: comedi: pcl812: use dev->read_subdev
>    staging: comedi: ni_pcimio: tidy up the irq request
>    staging: comedi: ni_pcidio: tidy up the irq request
>    staging: comedi: ni_at_a2150: tidy up the irq request
>    staging: comedi: me4000: refactor request_irq() during attach
>    staging: comedi: me4000: use dev->read_subdev
>    staging: comedi: me4000: remove unnecessary check in the irq handler
>    staging: comedi: das1800: tidy up irq request
>    staging: comedi: das1800: only init command support if irq is available
>    staging: comedi: das1800: remove unnecessary 'dev->irq' test
>    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: adl_pci9111: remove unnecessary 'dev->irq' test
>    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: request_irq() before seting up subdevices
>    staging: comedi: ni_pcidio: use dev->read_subdev
>    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           | 89 +++++++++-------------
>   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       | 45 +++++------
>   drivers/staging/comedi/drivers/ni_atmio16d.c       |  2 +-
>   drivers/staging/comedi/drivers/ni_pcidio.c         | 66 ++++++++--------
>   drivers/staging/comedi/drivers/ni_pcimio.c         | 19 ++---
>   drivers/staging/comedi/drivers/pcl812.c            | 11 +--
>   drivers/staging/comedi/drivers/pcl816.c            | 36 ++++-----
>   drivers/staging/comedi/drivers/pcl818.c            | 41 +++-------
>   drivers/staging/comedi/drivers/rtd520.c            |  2 +-
>   drivers/staging/comedi/drivers/s626.c              | 17 ++---
>   25 files changed, 234 insertions(+), 312 deletions(-)
>

I have issues with patches 18, 19, 22, and 49, although patch 19 is 
fixed by patch 20.

Patch 27 may be considered for stable kernels 3.7 and later if it 
applies cleanly (I need to check).

-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti at mev.co.uk>        )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587         )=-


More information about the devel mailing list