linux-2.6-block.git
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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).

11 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>
11 years agopstore/ram: Add ftrace messages handling
Anton Vorontsov [Tue, 10 Jul 2012 00:10:44 +0000 (17:10 -0700)]
pstore/ram: Add ftrace messages handling

The ftrace log size is configurable via ramoops.ftrace_size
module option, and the log itself is available via
<pstore-mount>/ftrace-ramoops file.

Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agopstore/ram: Convert to write_buf callback
Anton Vorontsov [Tue, 10 Jul 2012 00:10:43 +0000 (17:10 -0700)]
pstore/ram: Convert to write_buf callback

Don't use pstore.buf directly, instead convert the code to write_buf callback
which passes a pointer to a buffer as an argument.

Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agotracing/function: Introduce persistent trace option
Anton Vorontsov [Tue, 10 Jul 2012 00:10:42 +0000 (17:10 -0700)]
tracing/function: Introduce persistent trace option

This patch introduces 'func_ptrace' option, now available in
/sys/kernel/debug/tracing/options when function tracer
is selected.

The patch also adds some tiny code that calls back to pstore
to record the trace. The callback is no-op when PSTORE=n.

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>
11 years agopstore: Add persistent function tracing
Anton Vorontsov [Tue, 10 Jul 2012 00:10:41 +0000 (17:10 -0700)]
pstore: Add persistent function tracing

With this support kernel can save function call chain log into a
persistent ram buffer that can be decoded and dumped after reboot
through pstore filesystem. It can be used to determine what function
was last called before a reset or panic.

We store the log in a binary format and then decode it at read time.

p.s.
Mostly the code comes from trace_persistent.c driver found in the
Android git tree, written by Colin Cross <ccross@android.com>
(according to sign-off history). I reworked the driver a little bit,
and ported it to pstore.

Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agopstore: Introduce write_buf backend callback
Anton Vorontsov [Tue, 10 Jul 2012 00:10:40 +0000 (17:10 -0700)]
pstore: Introduce write_buf backend callback

For function tracing we need to stop using pstore.buf directly, since
in a tracing callback we can't use spinlocks, and thus we can't safely
use the global buffer.

With write_buf callback, backends no longer need to access pstore.buf
directly, and thus we can pass any buffers (e.g. allocated on stack).

Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agotracing: Fix initialization failure path in tracing_set_tracer()
Anton Vorontsov [Tue, 10 Jul 2012 00:10:39 +0000 (17:10 -0700)]
tracing: Fix initialization failure path in tracing_set_tracer()

If tracer->init() fails, current code will leave current_tracer pointing
to an unusable tracer, which at best makes 'current_tracer' report
inaccurate value.

Fix the issue by pointing current_tracer to nop tracer, and only update
current_tracer with the new one after all the initialization succeeds.

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>
11 years agopstore/ram_core: Get rid of prz->ecc enable/disable flag
Anton Vorontsov [Tue, 10 Jul 2012 00:03:20 +0000 (17:03 -0700)]
pstore/ram_core: Get rid of prz->ecc enable/disable flag

Nowadays we can use prz->ecc_size as a flag, no need for the special
member in the prz struct.

Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agopstore/ram: Make ECC size configurable
Anton Vorontsov [Tue, 10 Jul 2012 00:03:19 +0000 (17:03 -0700)]
pstore/ram: Make ECC size configurable

This is now pretty straightforward: instead of using bool, just pass
an integer. For backwards compatibility ramoops.ecc=1 means 16 bytes
ECC (using 1 byte for ECC isn't much of use anyway).

Suggested-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agopstore/ram_core: Get rid of prz->ecc_symsize and prz->ecc_poly
Anton Vorontsov [Tue, 10 Jul 2012 00:03:18 +0000 (17:03 -0700)]
pstore/ram_core: Get rid of prz->ecc_symsize and prz->ecc_poly

The struct members were never used anywhere outside of
persistent_ram_init_ecc(), so there's actually no need for them
to be in the struct.

If we ever want to make polynomial or symbol size configurable,
it would make more sense to just pass initialized rs_decoder
to the persistent_ram init functions.

Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: ste_rmi4: Fix typos
Justin P. Mattock [Mon, 16 Jul 2012 14:30:05 +0000 (07:30 -0700)]
staging: ste_rmi4: Fix typos

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>