[PATCH 0/2 v2] staging: comedi_pci: refactor comedi_pci_{enable, disable}

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

 



Pass the a struct comedi_device pointer to comedi_pci_{enable,disable}
instead of a struct pci_dev pointer.

This allows comedi_pci_disable to handle all the sanity checking before
releasing the resources and disabling the PCI device. It also allows
comedi_pci_enable to automatically determine the name passed to
pci_request_regions().

v2: add adv_pci1724 driver changes

H Hartley Sweeten (2):
  staging: comedi_pci: make comedi_pci_disable() safe to call
  staging: comedi_pci: pass comedi_device to comedi_pci_enable()

 drivers/staging/comedi/comedi_pci.c                | 27 ++++++++++++++--------
 drivers/staging/comedi/comedidev.h                 |  8 +++----
 drivers/staging/comedi/drivers/8255_pci.c          | 12 ++++------
 .../staging/comedi/drivers/addi-data/addi_common.c |  8 ++-----
 drivers/staging/comedi/drivers/addi_apci_1032.c    |  9 ++------
 drivers/staging/comedi/drivers/addi_apci_1516.c    |  7 ++----
 drivers/staging/comedi/drivers/addi_apci_16xx.c    | 14 ++---------
 drivers/staging/comedi/drivers/addi_apci_1710.c    |  9 ++------
 drivers/staging/comedi/drivers/addi_apci_2032.c    |  9 ++------
 drivers/staging/comedi/drivers/addi_apci_2200.c    |  9 ++------
 drivers/staging/comedi/drivers/addi_apci_3120.c    |  8 ++-----
 drivers/staging/comedi/drivers/addi_apci_3501.c    |  9 ++------
 drivers/staging/comedi/drivers/adl_pci6208.c       | 14 ++---------
 drivers/staging/comedi/drivers/adl_pci7x3x.c       | 14 ++---------
 drivers/staging/comedi/drivers/adl_pci8164.c       | 14 ++---------
 drivers/staging/comedi/drivers/adl_pci9111.c       |  9 ++------
 drivers/staging/comedi/drivers/adl_pci9118.c       | 14 ++++-------
 drivers/staging/comedi/drivers/adv_pci1710.c       |  9 ++------
 drivers/staging/comedi/drivers/adv_pci1723.c       | 13 ++++-------
 drivers/staging/comedi/drivers/adv_pci1724.c       | 14 ++---------
 drivers/staging/comedi/drivers/adv_pci_dio.c       |  8 ++-----
 drivers/staging/comedi/drivers/amplc_dio200.c      | 20 ++++++----------
 drivers/staging/comedi/drivers/amplc_pc236.c       | 14 ++++-------
 drivers/staging/comedi/drivers/amplc_pc263.c       | 14 ++++-------
 drivers/staging/comedi/drivers/amplc_pci224.c      | 15 ++++--------
 drivers/staging/comedi/drivers/amplc_pci230.c      | 17 ++++++--------
 drivers/staging/comedi/drivers/cb_pcidas.c         |  9 +++-----
 drivers/staging/comedi/drivers/cb_pcidas64.c       | 13 ++++-------
 drivers/staging/comedi/drivers/cb_pcidda.c         |  9 ++------
 drivers/staging/comedi/drivers/cb_pcimdas.c        |  9 ++------
 drivers/staging/comedi/drivers/cb_pcimdda.c        |  9 ++------
 drivers/staging/comedi/drivers/contec_pci_dio.c    | 14 ++---------
 drivers/staging/comedi/drivers/daqboard2000.c      | 11 +++------
 drivers/staging/comedi/drivers/das08_pci.c         |  7 ++----
 drivers/staging/comedi/drivers/dt3000.c            |  8 ++-----
 drivers/staging/comedi/drivers/dyna_pci10xx.c      |  8 ++-----
 drivers/staging/comedi/drivers/gsc_hpdi.c          | 11 ++++-----
 drivers/staging/comedi/drivers/icp_multi.c         |  8 ++-----
 drivers/staging/comedi/drivers/jr3_pci.c           | 10 ++++----
 drivers/staging/comedi/drivers/ke_counter.c        | 14 ++---------
 drivers/staging/comedi/drivers/me4000.c            | 13 ++++-------
 drivers/staging/comedi/drivers/me_daq.c            |  8 ++-----
 drivers/staging/comedi/drivers/mite.c              |  9 +-------
 drivers/staging/comedi/drivers/ni_6527.c           |  6 +++++
 drivers/staging/comedi/drivers/ni_65xx.c           |  6 +++++
 drivers/staging/comedi/drivers/ni_660x.c           |  6 +++++
 drivers/staging/comedi/drivers/ni_670x.c           |  6 +++++
 drivers/staging/comedi/drivers/ni_labpc.c          |  6 +++++
 drivers/staging/comedi/drivers/ni_pcidio.c         |  6 +++++
 drivers/staging/comedi/drivers/ni_pcimio.c         |  6 +++++
 drivers/staging/comedi/drivers/rtd520.c            |  8 ++-----
 drivers/staging/comedi/drivers/s626.c              |  8 ++-----
 drivers/staging/comedi/drivers/skel.c              |  6 ++---
 53 files changed, 185 insertions(+), 367 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