[PATCH 00/79] staging: comedi: cleanup request_region() use

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

 



Most of the legacy drivers that call request_region() output an error
message of some sort if the request failt. Introduce a helper function
to handle the request_region() and output the error message from that
function. Also, set the dev->iobase for the driver if the request is
successful. This removes a bunch of boilerplate code from the drivers.

Also, cleanup some dev->board_name usage that was missed in a previous
cleanup.

Note: The acl7225b and rti800 drivers still need the request_region()
cleanup. These drivers will be fixed after some pending patches are
merged.

H Hartley Sweeten (79):
  staging: comedi: drivers: introduce comedi_request_region()
  staging: comedi: pcl711: cleanup dev->board_name usage
  staging: comedi: pcl711: use comedi_request_region()
  staging: comedi: pcl724: cleanup dev->board_name usage
  staging: comedi: pcl724: use comedi_request_region()
  staging: comedi: pcl725: use comedi_request_region()
  staging: comedi: pcl726: cleanup dev->board_name usage
  staging: comedi: pcl726: use comedi_request_region()
  staging: comedi: pcl730: cleanup dev->board_name usage
  staging: comedi: pcl730: use comedi_request_region()
  staging: comedi: pcl812: cleanup dev->board_name usage
  staging: comedi: pcl812: use comedi_request_region()
  staging: comedi: pcl816: cleanup dev->board_name usage
  staging: comedi: pcl816: use comedi_request_region()
  staging: comedi: pcl818: cleanup dev->board_name usage
  staging: comedi: pcl818: use comedi_request_region()
  staging: comedi: pcl3724: use comedi_request_region()
  staging: comedi: pcl3730: use comedi_request_region()
  staging: comedi: amplc_dio200: cleanup dev->board_name usage
  staging: comedi: ampcl_dio200: use comedi_request_region()
  staging: comedi: ampcl_pc236: use comedi_request_region()
  staging: comedi: ampcl_pc263: use comedi_request_region()
  staging: comedi: rti802: use comedi_request_region()
  staging: comedi: das16m1: use comedi_request_region()
  staging: comedi: das08_isa: use comedi_request_region()
  staging: comedi: das16: cleanup dev->board_name usage
  staging: comedi: das16: use comedi_request_region()
  staging: comedi: das800: use comedi_request_region()
  staging: comedi: das1800: use comedi_request_region()
  staging: comedi: das6402: use comedi_request_region()
  staging: comedi: dt2801: use comedi_request_region()
  staging: comedi: dt2811: cleanup dev->board_name usage
  staging: comedi: dt2811: use comedi_request_region()
  staging: comedi: dt2814: use comedi_request_region()
  staging: comedi: dt2815: use comedi_request_region()
  staging: comedi: dt2817: use comedi_request_region()
  staging: comedi: dt282x: cleanup dev->board_name usage
  staging: comedi: dt282x: use comedi_request_region()
  staging: comedi: dmm32at: use comedi_request_region()
  staging: comedi: fl512: use comedi_request_region()
  staging: comedi: aio_aio12_8: cleanup dev->board_name usage
  staging: comedi: aio_aio12_8: use comedi_request_region()
  staging: comedi: aio_iiro_16: use comedi_request_region()
  staging: comedi: c6xdigio: board does not use interrupts
  staging: comedi: c6xdigio: remove usless comment
  staging: comedi: c6xdigio: use comedi_request_region()
  staging: comedi: mpc624: use comedi_request_region()
  staging: comedi: adq12b: use comedi_request_region()
  staging: comedi: adq12b: remove need for some local variables
  staging: comedi: ni_at_a2150: use comedi_request_region()
  staging: comedi: ni_atmio: use comedi_request_region()
  staging: comedi: ni_atmio16d: cleanup dev->board_name usage
  staging: comedi: ni_atmio16d: use comedi_request_region()
  staging: comedi: pcmad: cleanup dev->board_name usage
  staging: comedi: pcmad: use comedi_request_region()
  staging: comedi: pcmda12: use comedi_request_region()
  staging: comedi: pcmmio: use comedi_request_region()
  staging: comedi: pcmuio: cleanup dev->board_name usage
  staging: comedi: pcmuio: use comedi_request_region()
  staging: comedi: multiq3: board does not use interrupts
  staging: comedi: multiq3: remove usless comment
  staging: comedi: multiq3: use comedi_request_region()
  staging: comedi: poc: cleanup dev->board_name usage
  staging: comedi: poc: use comedi_request_region()
  staging: comedi: drivers: refactor comedi_request_region()
  staging: comedi: 8255: use __comedi_request_region()
  staging: comedi: das16: use __comedi_request_region()
  staging: comedi: das16m1: use __comedi_request_region()
  staging: comedi: das1800: use __comedi_request_region()
  staging: comedi: pcl816: use __comedi_request_region()
  staging: comedi: pcl818: use __comedi_request_region()
  staging: comedi: comedi_parport: use comedi_request_region()
  staging: comedi: unionxx5: refactor subdevice init
  staging: comedi: s526: use comedi_request_region()
  staging: comedi: ni_at_ao: cleanup dev->board_name usage
  staging: comedi: ni_at_ao: use comedi_request_region()
  staging: comedi: ni_labpc: cleanup dev->board_name usage
  staging: comedi: ni_labpc: only ISA boards need to request_region()
  staging: comedi: ni_labpc: use comedi_request_region()

 drivers/staging/comedi/comedidev.h              |  5 ++
 drivers/staging/comedi/drivers.c                | 45 ++++++++++++++++++
 drivers/staging/comedi/drivers/8255.c           |  7 +--
 drivers/staging/comedi/drivers/adq12b.c         | 38 +++------------
 drivers/staging/comedi/drivers/aio_aio12_8.c    | 16 ++-----
 drivers/staging/comedi/drivers/aio_iiro_16.c    | 16 ++-----
 drivers/staging/comedi/drivers/amplc_dio200.c   | 27 ++---------
 drivers/staging/comedi/drivers/amplc_pc236.c    | 26 ++---------
 drivers/staging/comedi/drivers/amplc_pc263.c    | 23 ++--------
 drivers/staging/comedi/drivers/c6xdigio.c       | 35 +++-----------
 drivers/staging/comedi/drivers/comedi_parport.c | 17 ++-----
 drivers/staging/comedi/drivers/das08_isa.c      |  9 ++--
 drivers/staging/comedi/drivers/das16.c          | 44 ++++++------------
 drivers/staging/comedi/drivers/das16m1.c        | 21 ++++-----
 drivers/staging/comedi/drivers/das1800.c        | 56 +++++++----------------
 drivers/staging/comedi/drivers/das6402.c        | 15 ++----
 drivers/staging/comedi/drivers/das800.c         | 20 ++------
 drivers/staging/comedi/drivers/dmm32at.c        | 16 ++-----
 drivers/staging/comedi/drivers/dt2801.c         | 12 ++---
 drivers/staging/comedi/drivers/dt2811.c         | 19 ++------
 drivers/staging/comedi/drivers/dt2814.c         | 11 ++---
 drivers/staging/comedi/drivers/dt2815.c         | 12 ++---
 drivers/staging/comedi/drivers/dt2817.c         | 13 ++----
 drivers/staging/comedi/drivers/dt282x.c         | 19 ++------
 drivers/staging/comedi/drivers/fl512.c          | 22 ++-------
 drivers/staging/comedi/drivers/mpc624.c         | 30 ++----------
 drivers/staging/comedi/drivers/multiq3.c        | 36 +++------------
 drivers/staging/comedi/drivers/ni_at_a2150.c    | 29 ++----------
 drivers/staging/comedi/drivers/ni_at_ao.c       | 16 ++-----
 drivers/staging/comedi/drivers/ni_atmio.c       | 12 ++---
 drivers/staging/comedi/drivers/ni_atmio16d.c    | 17 ++-----
 drivers/staging/comedi/drivers/ni_labpc.c       | 32 ++++++-------
 drivers/staging/comedi/drivers/ni_labpc.h       |  2 +-
 drivers/staging/comedi/drivers/ni_labpc_cs.c    |  2 +-
 drivers/staging/comedi/drivers/pcl711.c         | 20 ++------
 drivers/staging/comedi/drivers/pcl724.c         | 23 +++-------
 drivers/staging/comedi/drivers/pcl725.c         | 12 ++---
 drivers/staging/comedi/drivers/pcl726.c         | 19 ++------
 drivers/staging/comedi/drivers/pcl730.c         | 16 ++-----
 drivers/staging/comedi/drivers/pcl812.c         | 21 +++------
 drivers/staging/comedi/drivers/pcl816.c         | 30 ++++--------
 drivers/staging/comedi/drivers/pcl818.c         | 30 ++++--------
 drivers/staging/comedi/drivers/pcm3724.c        | 17 ++-----
 drivers/staging/comedi/drivers/pcm3730.c        | 13 ++----
 drivers/staging/comedi/drivers/pcmad.c          | 16 ++-----
 drivers/staging/comedi/drivers/pcmda12.c        | 16 ++-----
 drivers/staging/comedi/drivers/pcmmio.c         | 16 ++-----
 drivers/staging/comedi/drivers/pcmuio.c         | 19 ++------
 drivers/staging/comedi/drivers/poc.c            | 24 ++--------
 drivers/staging/comedi/drivers/rti802.c         | 11 ++---
 drivers/staging/comedi/drivers/s526.c           | 12 ++---
 drivers/staging/comedi/drivers/unioxx5.c        | 61 ++++++++++++-------------
 52 files changed, 312 insertions(+), 784 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