platform/adaptation/renesas_rcar/renesas_kernel.git
12 years agostaging: comedi: me_daq: store the pci_dev in the comedi_device
H Hartley Sweeten [Thu, 19 Jul 2012 02:03:59 +0000 (19:03 -0700)]
staging: comedi: me_daq: store the pci_dev in the comedi_device

Use the hw_dev pointer in the comedi_device struct to hold the
pci_dev instead of carrying it in the private data.

Since the pci_dev was the only thing in the private data, remove
the struct, the devpriv macro, and it's allocation.

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>
12 years agostaging: comedi: me_daq: cleanup "find pci device" code
H Hartley Sweeten [Thu, 19 Jul 2012 02:03:43 +0000 (19:03 -0700)]
staging: comedi: me_daq: cleanup "find pci device" code

Cleanup the "find pci device" code so that it follows the style
of the other comedi pci drivers.

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>
12 years agostaging: comedi: me_daq: factor out the "find pci device" code
H Hartley Sweeten [Thu, 19 Jul 2012 02:03:25 +0000 (19:03 -0700)]
staging: comedi: me_daq: factor out the "find pci device" code

Factor the "find pci device" code out of the attach function.

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>
12 years agostaging: comedi: ke_counter: remove the cnt_board_nbr macro
H Hartley Sweeten [Thu, 19 Jul 2012 02:03:08 +0000 (19:03 -0700)]
staging: comedi: ke_counter: remove the cnt_board_nbr macro

This macro is an open-coded version of ARRAY_SIZE(). Use that
instead.

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>
12 years agostaging: comedi: ke_counter: store the pci_dev in the comedi_device
H Hartley Sweeten [Thu, 19 Jul 2012 02:02:50 +0000 (19:02 -0700)]
staging: comedi: ke_counter: store the pci_dev in the comedi_device

Use the hw_dev pointer in the comedi_device struct to hold the
pci_dev instead of carrying it in the private data.

Since the pci_dev was the only thing in the private data, remove
the struct, the devpriv macro, and it's allocation.

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>
12 years agostaging: comedi: ke_counter: minor cleanup of cnt_attach()
H Hartley Sweeten [Thu, 19 Jul 2012 02:02:29 +0000 (19:02 -0700)]
staging: comedi: ke_counter: minor cleanup of cnt_attach()

Cleanup the attach function a bit to follow the style of
the other comedi pci drivers.

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>
12 years agostaging: comedi: ke_counter: cleanup "find pci device" code
H Hartley Sweeten [Thu, 19 Jul 2012 02:02:11 +0000 (19:02 -0700)]
staging: comedi: ke_counter: cleanup "find pci device" code

Cleanup the "find pci device" code so that it follows the style
of the other comedi pci drivers.

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>
12 years agostaging: comedi: ke_counter: factor out the "find pci device" code
H Hartley Sweeten [Thu, 19 Jul 2012 02:01:52 +0000 (19:01 -0700)]
staging: comedi: ke_counter: factor out the "find pci device" code

Factor the "find pci device" code out of the attach function.

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>
12 years agostaging: comedi: dyna_pci10xx: fix detach
H Hartley Sweeten [Thu, 19 Jul 2012 02:01:34 +0000 (19:01 -0700)]
staging: comedi: dyna_pci10xx: fix detach

The detach for this driver is missing the check to make sure
that the pci device is enabled before disabling it.

It's also missing the pci_dev_put().

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>
12 years agostaging: comedi: dyna_pci10xx: store the pci_dev in the comedi_device
H Hartley Sweeten [Thu, 19 Jul 2012 02:01:13 +0000 (19:01 -0700)]
staging: comedi: dyna_pci10xx: store the pci_dev in the comedi_device

Use the hw_dev pointer in the comedi_device struct to hold the
pci_dev instead of carrying it in the private data.

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>
12 years agostaging: comedi: dyna_pci10xx: use dev->iobase
H Hartley Sweeten [Thu, 19 Jul 2012 02:00:54 +0000 (19:00 -0700)]
staging: comedi: dyna_pci10xx: use dev->iobase

Use dev->iobase to hold one of the pci base addresses used
by the driver instead of carrying it in the private data.

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>
12 years agostaging: comedi: dyna_pci10xx: remove unused bars from the private data
H Hartley Sweeten [Thu, 19 Jul 2012 02:00:37 +0000 (19:00 -0700)]
staging: comedi: dyna_pci10xx: remove unused bars from the private data

All of the pci device base address registers are saved in the private
data but only bar2 and bar3 are used by the driver. Remove the others.

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>
12 years agostaging: comedi: dyna_pci10xx: remove 'valid' from the private data
H Hartley Sweeten [Thu, 19 Jul 2012 02:00:04 +0000 (19:00 -0700)]
staging: comedi: dyna_pci10xx: remove 'valid' from the private data

This variable is set at the end of the attach but never used
in the driver. Remove it.

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>
12 years agostaging: comedi: dyna_pci10xx: remove the 'start_stop_sem' mutex
H Hartley Sweeten [Thu, 19 Jul 2012 01:59:35 +0000 (18:59 -0700)]
staging: comedi: dyna_pci10xx: remove the 'start_stop_sem' mutex

The comedi core already has a mutex protecting the attach/detach
of the comedi drivers.

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>
12 years agostaging: comedi: dyna_pci10xx: cleanup "find pci device" code
H Hartley Sweeten [Thu, 19 Jul 2012 01:59:17 +0000 (18:59 -0700)]
staging: comedi: dyna_pci10xx: cleanup "find pci device" code

Cleanup the "find pci device" code so that it follows the style
of the other comedi pci drivers.

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>
12 years agostaging: comedi: dyna_pci10xx: factor out the "find pci device" code
H Hartley Sweeten [Thu, 19 Jul 2012 01:59:00 +0000 (18:59 -0700)]
staging: comedi: dyna_pci10xx: factor out the "find pci device" code

Factor the "find pci device" code out of the attach function.

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>
12 years agostaging: comedi: dt3000: store the pci_dev in the comedi_device
H Hartley Sweeten [Thu, 19 Jul 2012 01:58:43 +0000 (18:58 -0700)]
staging: comedi: dt3000: store the pci_dev in the comedi_device

Use the hw_dev pointer in the comedi_device struct to hold the
pci_dev instead of carrying it in the private data.

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>
12 years agostaging: comedi: dt3000: remove 'phys_addr' from the private data
H Hartley Sweeten [Thu, 19 Jul 2012 01:58:24 +0000 (18:58 -0700)]
staging: comedi: dt3000: remove 'phys_addr' from the private data

The 'phys_addr' variable in the private data is simply used as
a flag for the detach function to know that the pci device has
been enabled. Use the 'dev->iobase' variable instead as is more
typical for other comedi pci drivers.

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>
12 years agostaging: comedi: dt3000: move the setup_pci() code into the attach
H Hartley Sweeten [Thu, 19 Jul 2012 01:58:07 +0000 (18:58 -0700)]
staging: comedi: dt3000: move the setup_pci() code into the attach

The setup_pci() function simply calls comedi_pci_enable() to enable
the device then ioremaps the pci address. Move the code directly
into the attach function as is more typical for the comedi pci
drivers.

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>
12 years agostaging: comedi: dt3000: cleanup "find pci device" code
H Hartley Sweeten [Thu, 19 Jul 2012 01:57:49 +0000 (18:57 -0700)]
staging: comedi: dt3000: cleanup "find pci device" code

The "find pci device" code for this driver was split between
two functions which could cause the driver to walk the pci
bus multiple times while looking for a match.

Consolidate the functions into the format that is more
standard for the comedi pci drivers.

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>
12 years agostaging: comedi: daqboard2000: void *plx should be a void __iomem *
H Hartley Sweeten [Thu, 19 Jul 2012 01:57:28 +0000 (18:57 -0700)]
staging: comedi: daqboard2000: void *plx should be a void __iomem *

The private data variable 'plx' is an ioremap'ed pci resource and
should be a void __iomem *. This quiets a number of sparse warnings
about "different address spaces".

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>
12 years agostaging: comedi: daqboard2000: store the pci_dev in the comedi_device
H Hartley Sweeten [Thu, 19 Jul 2012 01:57:08 +0000 (18:57 -0700)]
staging: comedi: daqboard2000: store the pci_dev in the comedi_device

Use the hw_dev pointer in the comedi_device struct to hold the
pci_dev instead of carrying it in the private data.

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>
12 years agostaging: comedi: daqboard2000: remove 'got_regions' from private data
H Hartley Sweeten [Thu, 19 Jul 2012 01:56:49 +0000 (18:56 -0700)]
staging: comedi: daqboard2000: remove 'got_regions' from private data

The 'got_regions' variable in the private data is used as a flag
for the detach to know if the pci device has been enabled.

Typically the dev->iobase variable is used to indicate this in
all the other comedi drivers. Do the same here for consistancy.

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>
12 years agostaging: comedi: daqboard2000: cleanup "find pci device" code
H Hartley Sweeten [Thu, 19 Jul 2012 01:56:29 +0000 (18:56 -0700)]
staging: comedi: daqboard2000: cleanup "find pci device" code

The "find pci device" code for this driver was quite a bit
different from the other comedi pci drivers. Clean it up so
it follows the format of the other drivers.

Use for_each_pci_dev() instead of open-coding the loop using
pci_get_device().

Check for a specific bus/slot then the vendor/device ids.

The loop checking for the matching boardinfo was creating an
"id" based on the subsystem_device and subsystem_vendor info
from the pci_dev. The vendor id was already checked so just
check against the subsystem_device.

Only return the pci_dev if a matching boardinfo is found.

Consolidate the dev_err messages when a device is not found
into a single message.

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>
12 years agostaging: comedi: daqboard2000: factor out the "find pci device" code
H Hartley Sweeten [Thu, 19 Jul 2012 01:51:18 +0000 (18:51 -0700)]
staging: comedi: daqboard2000: factor out the "find pci device" code

Factor the "find pci device" code out of the attach function.

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>
12 years agostaging: comedi: contec_pci_dio: remove the private data
H Hartley Sweeten [Thu, 19 Jul 2012 01:50:59 +0000 (18:50 -0700)]
staging: comedi: contec_pci_dio: remove the private data

The private data is no longer needed by this driver. Remove the
struct, devpriv macro, and the allocation.

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>
12 years agostaging: comedi: contec_pci_dio: store the pci_dev in the comedi_device
H Hartley Sweeten [Thu, 19 Jul 2012 01:50:42 +0000 (18:50 -0700)]
staging: comedi: contec_pci_dio: store the pci_dev in the comedi_device

Use the hw_dev pointer in the comedi_device struct to hold the
pci_dev instead of carrying it in the private data.

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>
12 years agostaging: comedi: contec_pci_dio: cleanup "find pci device" code
H Hartley Sweeten [Thu, 19 Jul 2012 01:50:16 +0000 (18:50 -0700)]
staging: comedi: contec_pci_dio: cleanup "find pci device" code

Add a couple local variables and reorder the tests to make
to make the more concise.

Change the printk to a dev_err when no match is found and reword
the message.

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>
12 years agostaging: comedi: contec_pci_dio: factor out the "find pci device" code
H Hartley Sweeten [Thu, 19 Jul 2012 01:49:56 +0000 (18:49 -0700)]
staging: comedi: contec_pci_dio: factor out the "find pci device" code

Factor the "find pci device" code out of the attach function.

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>
12 years agostaging: comedi: cb_pcimdas: store the pci_dev in the comedi_device
H Hartley Sweeten [Thu, 19 Jul 2012 01:49:35 +0000 (18:49 -0700)]
staging: comedi: cb_pcimdas: store the pci_dev in the comedi_device

Use the hw_dev pointer in the comedi_device struct to hold the
pci_dev instead of carrying it in the private data.

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>
12 years agostaging: comedi: cb_pcimdas: remove BADR0 from the private data
H Hartley Sweeten [Thu, 19 Jul 2012 01:49:03 +0000 (18:49 -0700)]
staging: comedi: cb_pcimdas: remove BADR0 from the private data

The pci resource bar 0 address is only used as a "flag" to
let the datach function know that the pci device has been
enabled. Use dev->iobase in the detach instead and remove
BADR0 from the private data.

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>
12 years agostaging: comedi: cb_pcimdas: remove BADR2 from the private data
H Hartley Sweeten [Thu, 19 Jul 2012 01:48:27 +0000 (18:48 -0700)]
staging: comedi: cb_pcimdas: remove BADR2 from the private data

The pci resource bar 2 address is the primary i/o address used
by this device. Store it in dev->iobase and remove it from the
private data.

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>
12 years agostaging: comedi: cb_pcimdas: remove BADR4 from the private data
H Hartley Sweeten [Thu, 19 Jul 2012 01:48:07 +0000 (18:48 -0700)]
staging: comedi: cb_pcimdas: remove BADR4 from the private data

The pci resource bar 4 address is only needed to initialize the
8255 subdevice. Use a local variable to hold it and remove it
from the private data.

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>
12 years agostaging: comedi: cb_pcimdas: remove BADR1 from the private data
H Hartley Sweeten [Thu, 19 Jul 2012 01:47:46 +0000 (18:47 -0700)]
staging: comedi: cb_pcimdas: remove BADR1 from the private data

The pci resource bar 1 address is not used in the driver. Remove
it from the private data.

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>
12 years agostaging: comedi: cb_pcimdas: cleanup the private data
H Hartley Sweeten [Thu, 19 Jul 2012 01:47:11 +0000 (18:47 -0700)]
staging: comedi: cb_pcimdas: cleanup the private data

Remove the unused variables from the private data.

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>
12 years agostaging: comedi: cb_pcimdas: remove the debug print of the pci bars
H Hartley Sweeten [Thu, 19 Jul 2012 01:46:50 +0000 (18:46 -0700)]
staging: comedi: cb_pcimdas: remove the debug print of the pci bars

Remove the dev_dbg output of the pci addresses. It's just add noise.

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>
12 years agostaging: comedi: cb_pcimdas: cleanup "find pci device" code
H Hartley Sweeten [Thu, 19 Jul 2012 01:46:27 +0000 (18:46 -0700)]
staging: comedi: cb_pcimdas: cleanup "find pci device" code

Add a couple local variables to make the tests more concise.

Reorder the tests to make the for() loop checking for a
matching boardtype quicker.

Use ARRAY_SIZE() to determine the number of boards instead
of the hard-coded '1'.

Drop the dev_dbg for a match. It's just add noise.

Reword the dev_err when no match is found.

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>
12 years agostaging: comedi: cb_pcimdas: factor out the "find pci device" code
H Hartley Sweeten [Thu, 19 Jul 2012 01:46:07 +0000 (18:46 -0700)]
staging: comedi: cb_pcimdas: factor out the "find pci device" code

Factor the "find pci device" code out of the attach function.

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>
12 years agostaging: comedi: cb_pcidio: remove the private data
H Hartley Sweeten [Thu, 19 Jul 2012 01:45:26 +0000 (18:45 -0700)]
staging: comedi: cb_pcidio: remove the private data

The private data is no longer needed by this driver. Remove the
struct, devpriv macro, and the allocation.

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>
12 years agostaging: comedi: cb_pcidio: store the iobase in the comedi_device
H Hartley Sweeten [Thu, 19 Jul 2012 01:45:04 +0000 (18:45 -0700)]
staging: comedi: cb_pcidio: store the iobase in the comedi_device

Save the pci bar in dev->iobase instead of carrying it in the
private data.

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>
12 years agostaging: comedi: cb_pcidda: store the pci_dev in the comedi_device
H Hartley Sweeten [Thu, 19 Jul 2012 01:44:43 +0000 (18:44 -0700)]
staging: comedi: cb_pcidda: store the pci_dev in the comedi_device

Use the hw_dev pointer in the comedi_device struct to hold the
pci_dev instead of carrying it in the private data.

Save the pci bar in dev->iobase so the detach is consistent with
the other comedi pci drivers.

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>
12 years agostaging: comedi: cb_pcidda: cleanup "find pci device" code
H Hartley Sweeten [Thu, 19 Jul 2012 01:44:22 +0000 (18:44 -0700)]
staging: comedi: cb_pcidda: cleanup "find pci device" code

Add a couple local variables to make the tests more concise.
Reorder the tests to make the for() loop checking for a
matching boardtype quicker.

Drop the dev_dbg for a match. It's just add noise.
Reword the dev_err when no match is found.

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>
12 years agostaging: comedi: cb_pcidda: factor out the "find pci device" code
H Hartley Sweeten [Thu, 19 Jul 2012 01:44:03 +0000 (18:44 -0700)]
staging: comedi: cb_pcidda: factor out the "find pci device" code

Factor the "find pci device" code out of the attach function.

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>
12 years agostaging: comedi: cb_pcidas64: store the pci_dev in the comedi_device
H Hartley Sweeten [Thu, 19 Jul 2012 01:43:18 +0000 (18:43 -0700)]
staging: comedi: cb_pcidas64: store the pci_dev in the comedi_device

Use the hw_dev pointer in the comedi_device struct to hold the
pci_dev instead of carrying it in the private data.

Save the pci bar in dev->iobase so the detach is consistent with
the other comedi pci drivers.

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>
12 years agostaging: comedi: cb_pcidas64: cleanup "find pci device" code
H Hartley Sweeten [Thu, 19 Jul 2012 01:42:57 +0000 (18:42 -0700)]
staging: comedi: cb_pcidas64: cleanup "find pci device" code

Add a couple local variables to make the tests more concise.
Reorder the tests to make the for() loop checking for a
matching boardtype quicker.

Drop the dev_dbg for a match. It's just add noise.
Reword the dev_err when no match is found.

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>
12 years agostaging: comedi: cb_pcidas64: factor out the "find pci device" code
H Hartley Sweeten [Thu, 19 Jul 2012 01:42:36 +0000 (18:42 -0700)]
staging: comedi: cb_pcidas64: factor out the "find pci device" code

Factor the "find pci device" code out of the attach function.

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>
12 years agostaging: comedi: amplc_pci230: store the pci_dev in the comedi_device
H Hartley Sweeten [Thu, 19 Jul 2012 01:42:07 +0000 (18:42 -0700)]
staging: comedi: amplc_pci230: store the pci_dev in the comedi_device

Use the hw_dev pointer in the comedi_device struct to hold the
pci_dev instead of carrying it in the private data.

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>
12 years agostaging: comedi: amplc_pci230: cleanup "find pci device" code
H Hartley Sweeten [Thu, 19 Jul 2012 01:41:47 +0000 (18:41 -0700)]
staging: comedi: amplc_pci230: cleanup "find pci device" code

For aesthetic reasons, rename the function and pass the
comedi_devconfig struct instead of pre-parsing out the bus/slot
information.

Consolidate the dev_err messages when a pci device is not found.

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>
12 years agostaging: comedi: amplc_pci224: store the pci_dev in the comedi_device
H Hartley Sweeten [Thu, 19 Jul 2012 01:41:09 +0000 (18:41 -0700)]
staging: comedi: amplc_pci224: store the pci_dev in the comedi_device

Use the hw_dev pointer in the comedi_device struct to hold the
pci_dev instead of carrying it in the private data.

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>
12 years agostaging: comedi: amplc_pci224: cleanup "find pci device" code
H Hartley Sweeten [Thu, 19 Jul 2012 01:40:38 +0000 (18:40 -0700)]
staging: comedi: amplc_pci224: cleanup "find pci device" code

For aesthetic reasons, rename the function and pass the
comedi_devconfig struct instead of pre-parsing out the bus/slot
information.

Use for_each_pci_dev() instead of open-coding the loop using
pci_get_device().

Consolidate the dev_err messages when a pci device is not found.

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>
12 years agostaging: comedi: amplc_pc263: store the pci_dev in the comedi_device
H Hartley Sweeten [Thu, 19 Jul 2012 01:40:01 +0000 (18:40 -0700)]
staging: comedi: amplc_pc263: store the pci_dev in the comedi_device

Use the hw_dev pointer in the comedi_device struct to hold the
pci_dev instead of carrying it in the private data.

Since the pci_dev is no longer held in the provate data, we can
also cleanup the detach a bit. Remove the IS_ENABLED() tests in
the detach. If the pci_dev is non NULL it's a PCI device otherwise
it's an ISA device. Using IS_ENABLED() to omit the code paths
makes the code a bit confusing and doesn't save much.

Since the pci_dev was the only thing in the private data, remove
the struct, and it's allocation.

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>
12 years agostaging: comedi: amplc_pc263: cleanup "find pci device" code
H Hartley Sweeten [Thu, 19 Jul 2012 01:39:42 +0000 (18:39 -0700)]
staging: comedi: amplc_pc263: cleanup "find pci device" code

For aesthetic reasons, rename the function and pass the
comedi_devconfig struct instead of pre-parsing out the bus/slot
information.

Use for_each_pci_dev() instead of open-coding the loop using
pci_get_device().

Consolidate the dev_err messages when a pci device is not found.

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>
12 years agostaging: comedi: amplc_pc236: store the pci_dev in the comedi_device
H Hartley Sweeten [Thu, 19 Jul 2012 01:39:24 +0000 (18:39 -0700)]
staging: comedi: amplc_pc236: store the pci_dev in the comedi_device

Use the hw_dev pointer in the comedi_device struct to hold the
pci_dev instead of carrying it in the private data.

Since the pci_dev is no longer held in the provate data, we can
also cleanup the detach a bit. Remove the IS_ENABLED() tests in
the detach. If the pci_dev is non NULL it's a PCI device otherwise
it's an ISA device. Using IS_ENABLED() to omit the code paths
makes the code a bit confusing and doesn't save much.

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>
12 years agostaging: comedi: amplc_pc236: cleanup "find pci device" code
H Hartley Sweeten [Thu, 19 Jul 2012 01:39:03 +0000 (18:39 -0700)]
staging: comedi: amplc_pc236: cleanup "find pci device" code

For aesthetic reasons, rename the function and pass the
comedi_devconfig struct instead of pre-parsing out the bus/slot
information.

Use for_each_pci_dev() instead of open-coding the loop using
pci_get_device().

Consolidate the dev_err messages when a pci device is not found.

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>
12 years agostaging: comedi: amplc_dio200: store the pci_dev in the comedi_device
H Hartley Sweeten [Thu, 19 Jul 2012 01:37:50 +0000 (18:37 -0700)]
staging: comedi: amplc_dio200: store the pci_dev in the comedi_device

Use the hw_dev pointer in the comedi_device struct to hold the
pci_dev instead of carrying it in the private data.

Since the pci_dev is no longer held in the provate data, we can
also cleanup the detach a bit. Remove the IS_ENABLED() tests in
the detach. If the pci_dev is non NULL it's a PCI device otherwise
it's an ISA device. Using IS_ENABLED() to omit the code paths
makes the code a bit confusing and doesn't save much.

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>
12 years agostaging: comedi: amplc_dio200: cleanup "find pci device" code
H Hartley Sweeten [Thu, 19 Jul 2012 01:37:31 +0000 (18:37 -0700)]
staging: comedi: amplc_dio200: cleanup "find pci device" code

For aesthetic reasons, rename the function and pass the
comedi_devconfig struct instead of pre-parsing out the bus/slot
information.

Use for_each_pci_dev() instead of open-coding the loop using
pci_get_device().

Consolidate the dev_err messages when a pci device is not found.

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>
12 years agostaging: comedi: cb_pcidio: store the pci_dev in the comedi_device
H Hartley Sweeten [Thu, 19 Jul 2012 01:37:05 +0000 (18:37 -0700)]
staging: comedi: cb_pcidio: store the pci_dev in the comedi_device

Use the hw_dev pointer in the comedi_device struct to hold the
pci_dev instead of carrying it in the private data.

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>
12 years agostaging: comedi: cb_pcidio: cleanup "find pci device" code
H Hartley Sweeten [Thu, 19 Jul 2012 01:36:30 +0000 (18:36 -0700)]
staging: comedi: cb_pcidio: cleanup "find pci device" code

Add a couple local variables to make the tests more concise.
Reorder the tests to make the for() loop checking for a
matching boardtype quicker.

Drop the dev_dbg for a match. It's just add noise.
Reword the dev_err when no match is found.

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>
12 years agostaging: comedi: cb_pcidio: factor out the "find pci device" code
H Hartley Sweeten [Thu, 19 Jul 2012 01:36:08 +0000 (18:36 -0700)]
staging: comedi: cb_pcidio: factor out the "find pci device" code

Factor the "find pci device" code out of the attach function.

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>
12 years agostaging: comedi: cb_pcidas: store the pci_dev in the comedi_device
H Hartley Sweeten [Thu, 19 Jul 2012 01:35:38 +0000 (18:35 -0700)]
staging: comedi: cb_pcidas: store the pci_dev in the comedi_device

Use the hw_dev pointer in the comedi_device struct to hold the
pci_dev instead of carrying it in the private data.

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>
12 years agostaging: comedi: adv_pci_dio: store the pci_dev in the comedi_device
H Hartley Sweeten [Thu, 19 Jul 2012 01:35:13 +0000 (18:35 -0700)]
staging: comedi: adv_pci_dio: store the pci_dev in the comedi_device

Use the hw_dev pointer in the comedi_device struct to hold the
pci_dev instead of carrying it in the private data.

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>
12 years agostaging: comedi: adv_pci_dio: cleanup "find pci device" code
H Hartley Sweeten [Thu, 19 Jul 2012 01:34:51 +0000 (18:34 -0700)]
staging: comedi: adv_pci_dio: cleanup "find pci device" code

Add a couple local variables to make the tests more concise.
Reorder the tests to make the for() loop checking for a
matching boardtype quicker.

Drop the dev_dbg message for a match. It's just add noise.

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>
12 years agostaging: comedi: adv_pci_dio: remove CheckAndAllocCard()
H Hartley Sweeten [Thu, 19 Jul 2012 01:34:15 +0000 (18:34 -0700)]
staging: comedi: adv_pci_dio: remove CheckAndAllocCard()

This driver creates a linked list of all the pci devices in
the system while it's looking for a match. It's only use is
to determine if a device is "free" to use. The pci_is_enabled()
helper can give us the same information. Use that instead and
remove the linked list.

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>
12 years agostaging: comedi: adv_pci_dio: factor out the "find pci device" code
H Hartley Sweeten [Thu, 19 Jul 2012 01:33:27 +0000 (18:33 -0700)]
staging: comedi: adv_pci_dio: factor out the "find pci device" code

Factor the "find pci device" code out of the attach function.

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>
12 years agostaging: comedi: adv_pci1710: store the pci_dev in the comedi_device
H Hartley Sweeten [Thu, 19 Jul 2012 01:33:06 +0000 (18:33 -0700)]
staging: comedi: adv_pci1710: store the pci_dev in the comedi_device

Use the hw_dev pointer in the comedi_device struct to hold the
pci_dev instead of carrying it in the private data.

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>
12 years agostaging: comedi: adv_pci1710: move comedi_pci_enable() into the attach
H Hartley Sweeten [Thu, 19 Jul 2012 01:32:01 +0000 (18:32 -0700)]
staging: comedi: adv_pci1710: move comedi_pci_enable() into the attach

Use pci_is_enabled() in the "find pci device" function to determine if
the found pci device is not in use and move the comedi_pci_enable() call
into the attach.

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>
12 years agostaging: comedi: adv_pci1710: cleanup "find pci device" code
H Hartley Sweeten [Thu, 19 Jul 2012 01:31:43 +0000 (18:31 -0700)]
staging: comedi: adv_pci1710: cleanup "find pci device" code

Use for_each_pci_dev() instead of open-coding the loop using
pci_get_device().

Drop the printk error messages. They just add noise.

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>
12 years agostaging: comedi: adv_pci1710: factor out the "find pci device" code
H Hartley Sweeten [Thu, 19 Jul 2012 01:31:26 +0000 (18:31 -0700)]
staging: comedi: adv_pci1710: factor out the "find pci device" code

Factor the "find pci device" code out of the attach function.

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>
12 years agostaging: comedi: adv_pci1723: store the pci_dev in the comedi_device
H Hartley Sweeten [Thu, 19 Jul 2012 01:31:06 +0000 (18:31 -0700)]
staging: comedi: adv_pci1723: store the pci_dev in the comedi_device

Use the hw_dev pointer in the comedi_device struct to hold the
pci_dev instead of carrying it in the private data.

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>
12 years agostaging: comedi: adv_pci1723: move comedi_pci_enable() into the attach
H Hartley Sweeten [Thu, 19 Jul 2012 01:30:48 +0000 (18:30 -0700)]
staging: comedi: adv_pci1723: move comedi_pci_enable() into the attach

Use pci_is_enabled() in the "find pci device" function to determine if
the found pci device is not in use and move the comedi_pci_enable() call
into the attach.

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>
12 years agostaging: comedi: adv_pci1723: cleanup "find pci device" code
H Hartley Sweeten [Thu, 19 Jul 2012 01:30:15 +0000 (18:30 -0700)]
staging: comedi: adv_pci1723: cleanup "find pci device" code

Use for_each_pci_dev() instead of open-coding the loop using
pci_get_device().

Drop the printk error messages. They just add noise.

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>
12 years agostaging: comedi: adv_pci1723: factor out the "find pci device" code
H Hartley Sweeten [Thu, 19 Jul 2012 01:29:54 +0000 (18:29 -0700)]
staging: comedi: adv_pci1723: factor out the "find pci device" code

Factor the "find pci device" code out of the attach function.

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>
12 years agostaging: comedi: adl_pci9118: store the pci_dev in the comedi_device
H Hartley Sweeten [Thu, 19 Jul 2012 01:29:15 +0000 (18:29 -0700)]
staging: comedi: adl_pci9118: store the pci_dev in the comedi_device

Use the hw_dev pointer in the comedi_device struct to hold the
pci_dev instead of carrying it in the private data.

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>
12 years agostaging: comedi: adl_pci9111: store the pci_dev in the comedi_device
H Hartley Sweeten [Thu, 19 Jul 2012 01:28:43 +0000 (18:28 -0700)]
staging: comedi: adl_pci9111: store the pci_dev in the comedi_device

Use the hw_dev pointer in the comedi_device struct to hold the
pci_dev instead of carrying it in the private data.

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>
12 years agostaging: comedi: adl_pci8164: remove the private data
H Hartley Sweeten [Thu, 19 Jul 2012 01:28:13 +0000 (18:28 -0700)]
staging: comedi: adl_pci8164: remove the private data

The private data is no longer needed by this driver. Remove the
struct, devpriv macro, and the allocation.

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>
12 years agostaging: comedi: adl_pci8164: store the pci_dev in the comedi_device
H Hartley Sweeten [Thu, 19 Jul 2012 01:27:53 +0000 (18:27 -0700)]
staging: comedi: adl_pci8164: store the pci_dev in the comedi_device

Use the hw_dev pointer in the comedi_device struct to hold the
pci_dev instead of carrying it in the private data.

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>
12 years agostaging: comedi: adl_pci7432: remove the private data
H Hartley Sweeten [Thu, 19 Jul 2012 01:27:29 +0000 (18:27 -0700)]
staging: comedi: adl_pci7432: remove the private data

The private data is no longer needed by this driver. Remove the
struct, devpriv macro, and the allocation.

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>
12 years agostaging: comedi: adl_pci7432: store the pci_dev in the comedi_device
H Hartley Sweeten [Thu, 19 Jul 2012 01:27:03 +0000 (18:27 -0700)]
staging: comedi: adl_pci7432: store the pci_dev in the comedi_device

Use the hw_dev pointer in the comedi_device struct to hold the
pci_dev instead of carrying it in the private data.

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>
12 years agostaging: comedi: adl_pci7296: remove the private data
H Hartley Sweeten [Thu, 19 Jul 2012 01:26:23 +0000 (18:26 -0700)]
staging: comedi: adl_pci7296: remove the private data

The private data is no longer needed by this driver. Remove the
struct, devpriv macro, and the allocation.

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>
12 years agostaging: comedi: adl_pci7296: store the pci_dev in the comedi_device
H Hartley Sweeten [Thu, 19 Jul 2012 01:25:49 +0000 (18:25 -0700)]
staging: comedi: adl_pci7296: store the pci_dev in the comedi_device

Use the hw_dev pointer in the comedi_device struct to hold the
pci_dev instead of carrying it in the private data.

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>
12 years agostaging: comedi: adl_pci7230: remove the private data
H Hartley Sweeten [Thu, 19 Jul 2012 01:25:29 +0000 (18:25 -0700)]
staging: comedi: adl_pci7230: remove the private data

The private data is no longer needed by this driver. Remove the
struct, devpriv macro, and the allocation.

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>
12 years agostaging: comedi: adl_pci7230: store the pci_dev in the comedi_device
H Hartley Sweeten [Thu, 19 Jul 2012 01:24:57 +0000 (18:24 -0700)]
staging: comedi: adl_pci7230: store the pci_dev in the comedi_device

Use the hw_dev pointer in the comedi_device struct to hold the
pci_dev instead of carrying it in the private data.

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>
12 years agostaging: comedi: adl_pci6208: store the pci_dev in the comedi_device
H Hartley Sweeten [Thu, 19 Jul 2012 01:24:37 +0000 (18:24 -0700)]
staging: comedi: adl_pci6208: store the pci_dev in the comedi_device

Use the hw_dev pointer in the comedi_device struct to hold the
pci_dev instead of carrying it in the private data.

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>
12 years agostaging: comedi: comedidev.h: introduce comedi_to_pci_dev() helper
H Hartley Sweeten [Thu, 19 Jul 2012 17:39:33 +0000 (10:39 -0700)]
staging: comedi: comedidev.h: introduce comedi_to_pci_dev() helper

Introduce a wrapper for to_pci_dev() to allow the comedi_pci_drivers
to store the pci_dev pointer in the comedi_device hw_dev variable and
retrieve it easily.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbot <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/cptm1217: fix checkpatch warnings
Toshiaki Yamane [Wed, 18 Jul 2012 01:16:07 +0000 (10:16 +0900)]
staging/cptm1217: fix checkpatch warnings

The below checkpatch error was fixed,

drivers/staging/cptm1217/cp_tm1217.h:5: ERROR: open brace '{' following struct go on the same line

Signed-off-by: Toshiaki Yamane <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: remove unneeded PCI dependency
Lauri Hintsala [Wed, 18 Jul 2012 05:05:39 +0000 (08:05 +0300)]
staging: csr: remove unneeded PCI dependency

Signed-off-by: Lauri Hintsala <lauri.hintsala@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/frontier: fix checkpatch warnings
Toshiaki Yamane [Thu, 19 Jul 2012 01:08:42 +0000 (10:08 +0900)]
staging/frontier: fix checkpatch warnings

The below checkpatch warns was fixed,

drivers/staging/frontier/tranzport.c:356: WARNING: Prefer pr_err(... to printk(KERN_ERR, ...
drivers/staging/frontier/tranzport.c:523: WARNING: Prefer pr_err(... to printk(KERN_ERR, ...
drivers/staging/frontier/tranzport.c:696: WARNING: Prefer pr_err(... to printk(KERN_ERR, ...
drivers/staging/frontier/alphatrack.c:336: WARNING: Prefer pr_err(... to printk(KERN_ERR, ...
drivers/staging/frontier/alphatrack.c:497: WARNING: Prefer pr_err(... to printk(KERN_ERR, ...
drivers/staging/frontier/alphatrack.c:568: WARNING: Prefer pr_err(... to printk(KERN_ERR, ...

Signed-off-by: Toshiaki Yamane <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/et131x: fix checkpatch warnings
Toshiaki Yamane [Thu, 19 Jul 2012 01:34:32 +0000 (10:34 +0900)]
staging/et131x: fix checkpatch warnings

The below checkpatch warns was fixed,

drivers/staging/et131x/et131x.c:2556: WARNING: Prefer pr_info(... to printk(KERN_INFO, ...
drivers/staging/et131x/et131x.c:2577: WARNING: Prefer pr_info(... to printk(KERN_INFO, ...
drivers/staging/et131x/et131x.c:5189: WARNING: Prefer pr_info(... to printk(KERN_INFO, ...

And fixed below,
-added pr_fmt
-fixed printk formats for dma_addr_t
-converted printk to netdev_info

Signed-off-by: Toshiaki Yamane <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: sbe-2t3e3: Remove code that will never execute
Marcos Paulo de Souza [Tue, 17 Jul 2012 22:41:25 +0000 (19:41 -0300)]
staging: sbe-2t3e3: Remove code that will never execute

This patch removes all references of "if 0" blocks in the sbe-2t3e3 driver.

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agovme_user.c: remove duplicated include
Duan Jiong [Wed, 18 Jul 2012 14:25:39 +0000 (22:25 +0800)]
vme_user.c: remove duplicated include

Signed-off-by: Duan Jiong <djduanjiong@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoVME: Prevent D16 cycles being split into 8-bit blocks
Martyn Welch [Thu, 19 Jul 2012 16:48:46 +0000 (17:48 +0100)]
VME: Prevent D16 cycles being split into 8-bit blocks

The memcpy_fromio() and memcpy_toio() functions use the __memcpy() function,
at least on x86. This function carries out transfers smaller than 32 bits as
multiple 8 bit transfers, causing a single (aligned) 16 bit transfer to be
split into 2 8 bit transfers which may not be supported by the target VME
device.

The commit 53059aa05988761a738fa8bc082bbf3c5d4462d1 fixed this for the
ca91cx42, however this was not fixed for the tsi148 at the time. This patch
uses the same algorithm to fix the tsi148.

Reported-by: Daniel Lambert <daniel.lambert@clermont.in2p3.fr>
Signed-off-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: sm7xxfb: fix for "rename smtc_screen_info to smtc_scr_info"
Stephen Rothwell [Thu, 19 Jul 2012 22:36:08 +0000 (15:36 -0700)]
staging: sm7xxfb: fix for "rename smtc_screen_info to smtc_scr_info"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Javier Muñoz <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agopstore/ram: Make tracing log versioned
Anton Vorontsov [Tue, 17 Jul 2012 19:11:12 +0000 (12:11 -0700)]
pstore/ram: Make tracing log versioned

Decoding the binary trace w/ a different kernel might be troublesome
since we convert addresses to symbols. For kernels with minimal changes,
the mappings would probably match, but it's not guaranteed at all.
(But still we could convert the addresses by hand, since we do print
raw addresses.)

If we use modules, the symbols could be loaded at different addresses
from the previously booted kernel, and so this would also fail, but
there's nothing we can do about it.

Also, the binary data format that pstore/ram is using in its ringbuffer
may change between the kernels, so here we too must ensure that we're
running the same kernel.

So, there are two questions really:

1. How to compute the unique kernel tag;
2. Where to store it.

In this patch we're using LINUX_VERSION_CODE, just as hibernation
(suspend-to-disk) does. This way we are protecting from the kernel
version mismatch, making sure that we're running the same kernel
version and patch level. We could use CRC of a symbol table (as
suggested by Tony Luck), but for now let's not be that strict.

And as for storing, we are using a small trick here. Instead of
allocating a dedicated buffer for the tag (i.e. another prz), or
hacking ram_core routines to "reserve" some control data in the
buffer, we are just encoding the tag into the buffer signature
(and XOR'ing it with the actual signature value, so that buffers
not needing a tag can just pass zero, which will result into the
plain old PRZ signature).

Suggested-by: Steven Rostedt <rostedt@goodmis.org>
Suggested-by: Tony Luck <tony.luck@intel.com>
Suggested-by: Colin Cross <ccross@android.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agopstore: Headers should include all stuff they use
Anton Vorontsov [Tue, 17 Jul 2012 18:37:07 +0000 (11:37 -0700)]
pstore: Headers should include all stuff they use

Headers should really include all the needed prototypes, types, defines
etc. to be self-contained. This is a long-standing issue, but apparently
the new tracing code unearthed it (SMP=n is also a prerequisite):

In file included from fs/pstore/internal.h:4:0,
                 from fs/pstore/ftrace.c:21:
include/linux/pstore.h:43:15: error: field ‘read_mutex’ has incomplete type

While at it, I also added the following:

linux/types.h -> size_t, phys_addr_t, uXX and friends
linux/spinlock.h -> spinlock_t
linux/errno.h -> Exxxx
linux/time.h -> struct timespec (struct passed by value)
struct module and rs_control forward declaration (passed via pointers).

Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: ipack: change naming convention in TODO file
Samuel Iglesias Gonsálvez [Tue, 17 Jul 2012 10:56:18 +0000 (12:56 +0200)]
Staging: ipack: change naming convention in TODO file

Use the ANSI/VITA 4.0-1995 (S2011) naming convention for the mezzanine or
daughter boards. They are called IP modules in the Standard.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: ipack: added development mailing list in TODO file
Samuel Iglesias Gonsálvez [Tue, 17 Jul 2012 10:56:17 +0000 (12:56 +0200)]
Staging: ipack: added development mailing list in TODO file

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: rts5139: rts51x_card: fixed brace coding style issue
Erik Jones [Tue, 17 Jul 2012 03:51:15 +0000 (23:51 -0400)]
staging: rts5139: rts51x_card: fixed brace coding style issue

Fixed a coding style issue. An else statement was
not on the same line as the preceding if statement's
closing brace.

Signed-off-by: Erik Jones <erik@ejnode.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: rts5139: rts51x_card: fixed brace coding style issue
Erik Jones [Tue, 17 Jul 2012 03:51:14 +0000 (23:51 -0400)]
staging: rts5139: rts51x_card: fixed brace coding style issue

Fixed a coding style issue.

Signed-off-by: Erik Jones <erik@ejnode.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoMerge tag 'iio-fixes-3.6b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23...
Greg Kroah-Hartman [Tue, 17 Jul 2012 17:28:33 +0000 (10:28 -0700)]
Merge tag 'iio-fixes-3.6b' of git://git./linux/kernel/git/jic23/iio into staging-next

IIO fixes for elements queued for 3.6 merge window.

3 types of fix here.

1) Incorrect pointer casting via phys_addr_t which causes
   trouble on some architectures.
2) request_irq and free_irq dev_id parameters not matching.
3) Inconsistencies in client_data for some i2c devices
(writing one pointer and expecting another later).

12 years agotracing/function: Convert func_set_flag() to a switch statement
Anton Vorontsov [Tue, 10 Jul 2012 00:10:46 +0000 (17:10 -0700)]
tracing/function: Convert func_set_flag() to a switch statement

Since the function accepts just one bit, we can use the switch
construction instead of if/else if/...

Just a cosmetic change, there should be no functional changes.

Suggested-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>