linux/drivers/staging/comedi
Ian Abbott 27fc26f99e staging: comedi: ii_pci20kc: request and ioremap memory
The "ii_pci20kc" module is a comedi driver for Intelligent Instruments
PCI-20001C carrier board and modules.  Despite the name, this is
actually an ISA board and uses 1K of ISA memory space (below 1M) for the
main board plus up to three modules.  The address is set by hardware
jumpers.

When the board is attached to Comedi via the `COMEDI_DEVCONFIG` ioctl
and the driver's legacy "attach" handler, the base address is passed in.
The driver currently uses that address as-is, which is a bad idea.  It
doesn't even reserve the memory region.

Fix that by sanity checking the passed in address, reserving the memory
region and ioremapping it.

Replace the current "detach" handler `comedi_legacy_detach()` with a new
handler `ii20k_detach()` which unmaps the memory and releases the
region.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-01 15:00:18 -07:00
..
drivers staging: comedi: ii_pci20kc: request and ioremap memory 2014-08-01 15:00:18 -07:00
kcomedilib Staging: comedi: kcomedilib: replace deprecated simple_strtoul() with kstrtouint() 2014-02-15 12:42:41 -08:00
comedi_buf.c staging: comedi: pass subdevice to comedi_buf_write_n_available() 2014-05-23 21:25:50 +09:00
comedi_compat32.c staging: comedi: comedi_compat32: checkpatch.pl --strict cleanup 2014-07-18 16:10:39 -07:00
comedi_compat32.h staging: comedi: comedi_compat32.h: checkpatch.pl --strict cleanup 2014-07-18 16:10:40 -07:00
comedi_fops.c staging: comedi: comedidev.h: remove 'new_size' param from subdevice (*buf_change) 2014-07-22 15:33:23 -07:00
comedi_internal.h staging: comedi: comedi_internal.h: checkpatch.pl --strict cleanup 2014-07-18 16:10:39 -07:00
comedi_pci.c
comedi_pcmcia.c
comedi_usb.c
comedi.h staging: comedi: comedi.h: checkpatch.pl --strict cleanup 2014-07-18 16:10:40 -07:00
comedidev.h staging: comedi: add an 'mmio' member to comedi_device 2014-07-30 16:55:14 -07:00
comedilib.h
drivers.c staging: comedi: add an 'mmio' member to comedi_device 2014-07-30 16:55:14 -07:00
Kconfig staging: comedi: amplc_pc236: split into ISA, PCI and common module 2014-07-30 16:48:42 -07:00
Makefile staging: comedi: remove comedi_debug module parameter 2013-11-25 11:50:53 -08:00
proc.c Staging: comedi: proc: title block update 2014-03-19 04:41:04 +00:00
range.c Staging: comedi: range: remove unnecessary sanity check 2014-03-08 18:59:48 -08:00
TODO staging: comedi: TODO: remove item "reserve major number" 2014-05-28 14:18:11 -07:00