]> git.karo-electronics.de Git - linux-beck.git/commit
staging: comedi: ni_labpc: only ISA boards need to request_region()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 9 Apr 2013 23:34:17 +0000 (16:34 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 Apr 2013 19:47:55 +0000 (12:47 -0700)
commitde024b3d57ba93f8a63a1610a15587e3358d4a4d
tree96b8669cb66f117d9a62dda322f51ab19c5abc78
parent7a1e1f9ae5f15026126f09311b158d6673ad8200
staging: comedi: ni_labpc: only ISA boards need to request_region()

Currently this driver calls request_region() in labpc_common_attach()
which is the common attach function for the ISA, PCMCIA, and PCI
versions of the labpc board.

The PCMCIA support is handled in a separate driver, ni_labpc_cs.
That driver sets the dev->iobase after aquiring the resource and
then just passes it to labpc_common_attach() which then sets
dev->iobase again.

The PCI support, currently in this driver, calls mite_setup() to
aquire the resource and then passes it to labpc_common_attach()
to set the dev->iobase.

The ISA support, also in this driver, passes a user supplied
configuration option to labpc_common_attach() which then does
the request_region() before setting the dev->iobase.

Move the request_region() to the ISA support code in labpc_attach()
and set the dev->iobase there before calling the common attach
code.

For the PCI support, also set the dev->iobase before calling the
common code.

This allows removing the extra parameter from labpc_common_attach().

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