Re: [PATCH 0/3] staging: comedi: ni_stc.h: cleanup the ni_private data

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

 



On 2014-05-29 18:56, H Hartley Sweeten wrote:
The comedi drivers that use the ni_mio_common.c source share a private data
struct. This struct is defined in ni_stc.h as a macro so that the real driver
can add additional members to the struct. These additional members are not
actually needed since they are either unused or can be found when needed.

Remove the macro and define the private data as a real struct.

Remove some unused members from the private data.

Add some callbacks to the private data to remove the read/write macros
that the real drivers use to access the hardware.

Note: the last patch is pretty large. If needed I can break it up to remove
each of the macros one at a time.

The last patch is mostly a lot of straightforward substitution, so I think it's quite easy to follow despite being long.


H Hartley Sweeten (3):
   staging: comedi: ni_stc.h: remove NI_PRIVATE_COMMON macro
   staging: comedi: ni_stc.h: remove unused members from struct ni_private
   staging: comedi: ni_stc.h: add read/write callbacks to struct ni_private

  drivers/staging/comedi/drivers/ni_atmio.c      |  78 +++--
  drivers/staging/comedi/drivers/ni_mio_common.c | 385 +++++++++++++------------
  drivers/staging/comedi/drivers/ni_mio_cs.c     |  59 ++--
  drivers/staging/comedi/drivers/ni_pcimio.c     | 123 +++++---
  drivers/staging/comedi/drivers/ni_stc.h        | 173 +++++------
  5 files changed, 467 insertions(+), 351 deletions(-)

Looks good!

Reviewed-by: Ian Abbott <abbotti@xxxxxxxxx>

--
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@xxxxxxxxx>        )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587         )=-
_______________________________________________
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