OSDN Git Service

staging: comedi: ni_daq_dio24: convert to auto attach
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 30 Jan 2013 23:47:01 +0000 (16:47 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 4 Feb 2013 01:27:37 +0000 (19:27 -0600)
commit5a1daad46a99f1f33b2559ff87a0fb9b01a07c87
tree09f3aec2d47ffb421a9e4d26290c0127448606d4
parent6746dc6340ea90e04f51825042d4e5e47472b951
staging: comedi: ni_daq_dio24: convert to auto attach

Convert this pcmcia driver to the comedi auto attach mechanism.

This allows getting rid of the "hack" needed to pass the pcmcia_device
pointer from the pcmcia_driver to the comedi_driver as well as the
now unnecessary boardinfo.

Check the call to subdev_8255_init() for success. That function does
a kzalloc and could return -ENOMEM.

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/ni_daq_dio24.c