[PATCH v2 00/11] staging: comedi: tidy up legacy driver detach

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

 



Tidy up the (*detach) boilerplate code for comedi legacy drivers.

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.

v2: Modify [PATCH 01/12] to save the region 'len' along with the
    'start' instead of the struct resource * of the region.
    
    Drop [PATCH 12/12] for now.
    
H Hartley Sweeten (11):
  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()

 drivers/staging/comedi/comedidev.h              |  2 ++
 drivers/staging/comedi/drivers.c                | 24 +++++++++++++-
 drivers/staging/comedi/drivers/acl7225b.c       | 10 +-----
 drivers/staging/comedi/drivers/adq12b.c         |  8 +----
 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 +----
 drivers/staging/comedi/drivers/amplc_pc236.c    |  7 ++--
 drivers/staging/comedi/drivers/amplc_pc263.c    |  8 +----
 drivers/staging/comedi/drivers/c6xdigio.c       |  3 +-
 drivers/staging/comedi/drivers/comedi_parport.c | 10 +-----
 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/fl512.c          |  8 +----
 drivers/staging/comedi/drivers/mpc624.c         |  8 +----
 drivers/staging/comedi/drivers/multiq3.c        |  8 +----
 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       | 11 ++++---
 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/rti800.c         |  8 +----
 drivers/staging/comedi/drivers/rti802.c         |  8 +----
 drivers/staging/comedi/drivers/s526.c           |  8 +----
 drivers/staging/comedi/drivers/skel.c           |  9 ++---
 51 files changed, 123 insertions(+), 376 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