[PATCH v2 00/31] staging: comedi: cleanup irq requests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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(-)

-- 
1.8.4.4

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux