staging: comedi: quatech_daqp_cs: store private data in the comedi_device
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 4 Feb 2013 23:42:56 +0000 (16:42 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 5 Feb 2013 19:18:57 +0000 (11:18 -0800)
commitc12717423e1c61682fada53193813248095cba44
treeb2b27e2159eecf8a3aa3ab5ce18168a9e4f688b9
parent9c1dcce9c64c2b53042f2cfb730348201d176855
staging: comedi: quatech_daqp_cs: store private data in the comedi_device

All the comedi_subdevices in this driver use the same 'local' private data.
Instead of storing the pointer to the private data in each subdevice, just
store it in the comedi_device.

Also, instead of passing the private data pointer to pcmcia_request_irq()
in link->priv, pass the comedi_device pointer. This allows removing the
comedi_device and comedi_subdevice pointers from the private data. We can
get them as needed from the void * in the interrupt function.

Fix the pcmcia suspend/resume functions so they use the comedi_device
pointer stored in link->priv to then get the private data pointer.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/quatech_daqp_cs.c