[PATCH 00/12] staging: comedi: tidy up driver detach

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

 



Tidy up some of the comedi driver detach boilerplate code.

Introduce a common (*detach) function for the legacy drivers. This
function will automatically release the first I/O region that a
driver requests using the comedi_request_region() helper. It will
also automatically free any irq resource that has been requested
as long as the driver sets the dev->irq variable.

Move the freeing of the irq resource for comedi PCI drivers into
comedi_pci_disable() to match the operation of the legacy detach.

H Hartley Sweeten (12):
  staging: comedi: drivers: introduce comedi_legacy_detach()
  staging: comedi: pcl812: use comedi_legacy_detach()
  staging: comedi: das16: use comedi_legacy_detach()
  staging: comedi: das16m1: use comedi_legacy_detach()
  staging: comedi: das16m1: check for subdev_8255_init() failure
  staging: comedi: das1800: use comedi_legacy_detach()
  staging: comedi: drivers: use comedi_legacy_detach() in simple drivers
  staging: comedi: amplc_dio200: use comedi_legacy_detach()
  staging: comedi: skel: use comedi_legacy_detach()
  staging: comedi: drivers: use comedi_legacy_detach()
  staging: comedi: drivers: free_irq() in comedi_legacy_detach()
  staging: comedi: comedi_pci: free_irq() in comedi_pci_disable()

 drivers/staging/comedi/comedi_pci.c                |  5 +++
 drivers/staging/comedi/comedidev.h                 |  2 +
 drivers/staging/comedi/drivers.c                   | 34 ++++++++++++++++-
 drivers/staging/comedi/drivers/acl7225b.c          | 10 +----
 .../staging/comedi/drivers/addi-data/addi_common.c |  2 -
 drivers/staging/comedi/drivers/addi_apci_1032.c    |  2 -
 drivers/staging/comedi/drivers/addi_apci_1710.c    |  2 -
 drivers/staging/comedi/drivers/addi_apci_2032.c    |  2 -
 drivers/staging/comedi/drivers/addi_apci_3120.c    |  2 -
 drivers/staging/comedi/drivers/addi_apci_3501.c    |  2 -
 drivers/staging/comedi/drivers/adl_pci9111.c       |  2 -
 drivers/staging/comedi/drivers/adl_pci9118.c       |  2 -
 drivers/staging/comedi/drivers/adq12b.c            |  8 +---
 drivers/staging/comedi/drivers/adv_pci1710.c       |  2 -
 drivers/staging/comedi/drivers/aio_aio12_8.c       |  3 +-
 drivers/staging/comedi/drivers/aio_iiro_16.c       |  8 +---
 drivers/staging/comedi/drivers/amplc_dio200.c      |  8 +---
 .../staging/comedi/drivers/amplc_dio200_common.c   |  2 -
 drivers/staging/comedi/drivers/amplc_pc236.c       |  5 +--
 drivers/staging/comedi/drivers/amplc_pc263.c       |  8 +---
 drivers/staging/comedi/drivers/amplc_pci224.c      |  2 -
 drivers/staging/comedi/drivers/amplc_pci230.c      |  2 -
 drivers/staging/comedi/drivers/c6xdigio.c          |  3 +-
 drivers/staging/comedi/drivers/cb_pcidas.c         |  2 -
 drivers/staging/comedi/drivers/cb_pcidas64.c       |  2 -
 drivers/staging/comedi/drivers/cb_pcimdas.c        |  9 +----
 drivers/staging/comedi/drivers/comedi_parport.c    | 10 +----
 drivers/staging/comedi/drivers/daqboard2000.c      |  2 -
 drivers/staging/comedi/drivers/das08_isa.c         |  5 +--
 drivers/staging/comedi/drivers/das16.c             | 24 ++++--------
 drivers/staging/comedi/drivers/das16m1.c           | 24 ++++++------
 drivers/staging/comedi/drivers/das1800.c           | 18 +++------
 drivers/staging/comedi/drivers/das6402.c           | 10 +----
 drivers/staging/comedi/drivers/das800.c            | 11 +-----
 drivers/staging/comedi/drivers/dmm32at.c           | 10 +----
 drivers/staging/comedi/drivers/dt2801.c            |  8 +---
 drivers/staging/comedi/drivers/dt2811.c            | 10 +----
 drivers/staging/comedi/drivers/dt2814.c            | 10 +----
 drivers/staging/comedi/drivers/dt2815.c            |  8 +---
 drivers/staging/comedi/drivers/dt2817.c            |  8 +---
 drivers/staging/comedi/drivers/dt282x.c            |  5 +--
 drivers/staging/comedi/drivers/dt3000.c            |  2 -
 drivers/staging/comedi/drivers/fl512.c             |  8 +---
 drivers/staging/comedi/drivers/gsc_hpdi.c          |  2 -
 drivers/staging/comedi/drivers/icp_multi.c         |  9 ++---
 drivers/staging/comedi/drivers/me4000.c            |  2 -
 drivers/staging/comedi/drivers/mpc624.c            |  8 +---
 drivers/staging/comedi/drivers/multiq3.c           |  8 +---
 drivers/staging/comedi/drivers/ni_6527.c           |  8 ++--
 drivers/staging/comedi/drivers/ni_65xx.c           | 18 +++------
 drivers/staging/comedi/drivers/ni_660x.c           |  2 -
 drivers/staging/comedi/drivers/ni_at_a2150.c       |  7 +---
 drivers/staging/comedi/drivers/ni_at_ao.c          |  8 +---
 drivers/staging/comedi/drivers/ni_atmio.c          |  5 +--
 drivers/staging/comedi/drivers/ni_atmio16d.c       |  5 +--
 drivers/staging/comedi/drivers/ni_labpc.c          |  6 +--
 drivers/staging/comedi/drivers/ni_pcidio.c         |  2 -
 drivers/staging/comedi/drivers/ni_pcimio.c         |  2 -
 drivers/staging/comedi/drivers/pcl711.c            | 10 +----
 drivers/staging/comedi/drivers/pcl724.c            |  7 +---
 drivers/staging/comedi/drivers/pcl725.c            |  8 +---
 drivers/staging/comedi/drivers/pcl726.c            | 14 +------
 drivers/staging/comedi/drivers/pcl730.c            | 10 +----
 drivers/staging/comedi/drivers/pcl812.c            | 44 +++++++---------------
 drivers/staging/comedi/drivers/pcl816.c            | 12 ++----
 drivers/staging/comedi/drivers/pcl818.c            |  5 +--
 drivers/staging/comedi/drivers/pcm3724.c           |  3 +-
 drivers/staging/comedi/drivers/pcm3730.c           |  8 +---
 drivers/staging/comedi/drivers/pcmad.c             | 10 +----
 drivers/staging/comedi/drivers/pcmda12.c           |  8 +---
 drivers/staging/comedi/drivers/pcmmio.c            |  8 +---
 drivers/staging/comedi/drivers/pcmuio.c            |  7 +---
 drivers/staging/comedi/drivers/poc.c               | 10 +----
 drivers/staging/comedi/drivers/rtd520.c            |  6 ---
 drivers/staging/comedi/drivers/rti800.c            |  8 +---
 drivers/staging/comedi/drivers/rti802.c            |  8 +---
 drivers/staging/comedi/drivers/s526.c              |  8 +---
 drivers/staging/comedi/drivers/s626.c              |  2 -
 drivers/staging/comedi/drivers/skel.c              |  9 +++--
 79 files changed, 146 insertions(+), 455 deletions(-)

-- 
1.8.1.4

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/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