[PATCH 00/22] staging: comedi: pass subdevice around instead of async

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

 



For comedi subdevices that support asynchronous commands, the `async`
member of `struct comedi_subdevice` points to a `struct comedi_async`
allocated to manage asynchronous commands on that subdevice.  The
pointer to this "async" structure is passed around by various functions
and some of those functions need to get back to the "subdevice"
structure from this pointer, so the "async" structure has a `subdevice`
member pointing back to the `struct comedi_subdevice`.

Since we can always get to the "async" structure from the "subdevice"
structure, we can just pass around the pointer to the subdevice instead
of the pointer to the async structure.  Then the `subdevice` member of
`struct comedi_async` is no longer required and can be removed.

01) staging: comedi: remove redundant pointer dereference in
    comedi_poll()
02) staging: comedi: remove async parameter from resize_async_buffer()
03) staging: comedi: pass subdevice to comedi_buf_put()
04) staging: comedi: pass subdevice to comedi_buf_get()
05) staging: comedi: pass subdevice to comedi_buf_memcpy_to()
06) staging: comedi: pass subdevice to comedi_buf_memcpy_from()
07) staging: comedi: ni_tiocmd: pass subdevice to command setup
    functions
08) staging: comedi: pass subdevice to comedi_buf_write_alloc()
09) staging: comedi: pass subdevice to comedi_buf_write_free()
10) staging: comedi: pass subdevice to comedi_buf_write_n_allocated()
11) staging: comedi: pass subdevice to comedi_buf_read_alloc()
12) staging: comedi: pass subdevice to comedi_buf_read_free()
13) staging: comedi: pass subdevice to comedi_buf_read_n_available()
14) staging: comedi: pass subdevice to comedi_buf_reset()
15) staging: comedi: pass subdevice to comedi_buf_is_mmapped()
16) staging: comedi: pass subdevice to comedi_buf_munge()
17) staging: comedi: pass subdevice to __comedi_buf_write_alloc()
18) staging: comedi: pass subdevice to comedi_buf_write_n_available()
19) staging: comedi: mite: pass subdevice to mite_buf_change()
20) staging: comedi: mite: pass subdevice to mite_sync_input_dma()
21) staging: comedi: mite: pass subdevice to mite_sync_output_dma()
22) staging: comedi: remove subdevice member of struct comedi_async

 drivers/staging/comedi/comedi_buf.c                | 66 +++++++++++++---------
 drivers/staging/comedi/comedi_fops.c               | 48 ++++++++--------
 drivers/staging/comedi/comedi_internal.h           |  6 +-
 drivers/staging/comedi/comedidev.h                 | 20 +++----
 drivers/staging/comedi/drivers.c                   |  1 -
 drivers/staging/comedi/drivers/8255.c              |  2 +-
 .../comedi/drivers/addi-data/hwdrv_apci3120.c      |  2 +-
 .../comedi/drivers/addi-data/hwdrv_apci3200.c      |  7 +--
 drivers/staging/comedi/drivers/addi_apci_1032.c    |  2 +-
 drivers/staging/comedi/drivers/addi_apci_2032.c    |  2 +-
 drivers/staging/comedi/drivers/addi_apci_3xxx.c    |  2 +-
 drivers/staging/comedi/drivers/adv_pci1710.c       | 10 ++--
 .../staging/comedi/drivers/amplc_dio200_common.c   |  2 +-
 drivers/staging/comedi/drivers/amplc_pc236.c       |  2 +-
 drivers/staging/comedi/drivers/amplc_pci224.c      |  2 +-
 drivers/staging/comedi/drivers/amplc_pci230.c      |  8 +--
 drivers/staging/comedi/drivers/cb_pcidas64.c       |  2 +-
 drivers/staging/comedi/drivers/comedi_fc.c         | 16 +++---
 drivers/staging/comedi/drivers/comedi_parport.c    |  2 +-
 drivers/staging/comedi/drivers/dmm32at.c           |  8 +--
 drivers/staging/comedi/drivers/dt282x.c            |  2 +-
 drivers/staging/comedi/drivers/dt3000.c            |  2 +-
 drivers/staging/comedi/drivers/me4000.c            |  4 +-
 drivers/staging/comedi/drivers/mite.c              | 26 ++++-----
 drivers/staging/comedi/drivers/mite.h              |  6 +-
 drivers/staging/comedi/drivers/ni_6527.c           |  2 +-
 drivers/staging/comedi/drivers/ni_65xx.c           |  2 +-
 drivers/staging/comedi/drivers/ni_660x.c           |  6 +-
 drivers/staging/comedi/drivers/ni_atmio16d.c       |  2 +-
 drivers/staging/comedi/drivers/ni_mio_common.c     | 20 +++----
 drivers/staging/comedi/drivers/ni_pcidio.c         | 12 ++--
 drivers/staging/comedi/drivers/ni_pcimio.c         | 10 ++--
 drivers/staging/comedi/drivers/ni_tiocmd.c         | 24 ++++----
 drivers/staging/comedi/drivers/pcl711.c            |  2 +-
 drivers/staging/comedi/drivers/pcl726.c            |  2 +-
 drivers/staging/comedi/drivers/pcl812.c            |  4 +-
 drivers/staging/comedi/drivers/pcl816.c            |  2 +-
 drivers/staging/comedi/drivers/pcl818.c            |  6 +-
 drivers/staging/comedi/drivers/pcmmio.c            |  4 +-
 drivers/staging/comedi/drivers/pcmuio.c            |  4 +-
 drivers/staging/comedi/drivers/quatech_daqp_cs.c   |  2 +-
 drivers/staging/comedi/drivers/rtd520.c            |  4 +-
 drivers/staging/comedi/drivers/s626.c              |  1 -
 drivers/staging/comedi/drivers/usbdux.c            |  4 +-
 drivers/staging/comedi/drivers/usbduxsigma.c       |  2 +-
 45 files changed, 184 insertions(+), 181 deletions(-)
_______________________________________________
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