Re: [PATCH v2 14/15] staging: comedi: 8255: handle memory mapped io

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

 



On 2014-08-12 19:41, H Hartley Sweeten wrote:
The drivers that use this module with memory mapped io all have the
ioremap'ed base address stored in the comedi_device 'mmio' member.

Introduce a default (*io) function that does 8-bit memory mapped io.

Modify subdev_8255_init() so that it takes a flag parameter indicating
if the io is port or memory mapped. Make the function static and rename
it to __subdev_8255_init().

Introduce two exported wrappers for __subdev_8255_init():

   subdev_8255_init() - for drivers that do 8-bit port io
   subdev_8255_mm_init() - for drivers that do 8-bit memory mapped io

Use subdev_8255_mm_init() in the drivers that do 8-bit memory mapped io
and remove the private (*io) functions.

Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>
Cc: Ian Abbott <abbotti@xxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
  drivers/staging/comedi/drivers/8255.c        | 43 ++++++++++++++++++++++++----
  drivers/staging/comedi/drivers/8255.h        |  7 ++++-
  drivers/staging/comedi/drivers/8255_pci.c    | 19 ++----------
  drivers/staging/comedi/drivers/cb_pcidas64.c | 14 ++-------
  drivers/staging/comedi/drivers/ni_labpc.c    | 14 +--------
  5 files changed, 50 insertions(+), 47 deletions(-)

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