platform/upstream/kernel-adaptation-pc.git
11 years agostaging: comedi: adl_pci8164: remove buggy dev_dbg()
H Hartley Sweeten [Wed, 6 Mar 2013 22:57:24 +0000 (15:57 -0700)]
staging: comedi: adl_pci8164: remove buggy dev_dbg()

The dev_dbg() messages in the adl_pci8164_insn_{read,out} functions
output the 'data' that was read/write to the device. Two 'data' values
are always printed, data[0] and data[1].

The 'data' pointer points to an array of unsigned int values. The number
of values in the array is indicated by insn->n. The number of data
elements is never checked so the dev_dbg() could be trying to access
a 'data' element that is invalid.

Instead of fixing the dev_dbg() just remove them. They are really just
added 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: das08: remove 'id' from boardinfo
H Hartley Sweeten [Tue, 5 Mar 2013 17:27:07 +0000 (10:27 -0700)]
staging: comedi: das08: remove 'id' from boardinfo

With the bus specific code split out, the device id in the boardinfo
is no longer needed. 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: addi_common: remove 'i_VendorId' and 'i_Device Id'
H Hartley Sweeten [Tue, 5 Mar 2013 17:26:44 +0000 (10:26 -0700)]
staging: comedi: addi_common: remove 'i_VendorId' and 'i_Device Id'

The vendor/device ids in the boardinfo are not longer needed. Remove
them.

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: addi_apci_1710: remove boardinfo
H Hartley Sweeten [Tue, 5 Mar 2013 17:26:23 +0000 (10:26 -0700)]
staging: comedi: addi_apci_1710: remove boardinfo

This driver only uses the boardinfo to get the dev->board_name.
Just use the dev->driver->driver_name and remove the unnecessary
boardinfo completely.

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: addi_apci_1710: remove 'interrupt' from boardinfo
H Hartley Sweeten [Tue, 5 Mar 2013 17:26:02 +0000 (10:26 -0700)]
staging: comedi: addi_apci_1710: remove 'interrupt' from boardinfo

Only one board type is supported by this driver. Remove the 'interrupt'
field from the boardinfo and just call the function directly in
v_ADDI_Interrupt().

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: addi_common: remove addi_find_boardinfo()
H Hartley Sweeten [Tue, 5 Mar 2013 17:25:32 +0000 (10:25 -0700)]
staging: comedi: addi_common: remove addi_find_boardinfo()

All the users of the addi_common code now set the dev->board_ptr
before calling addi_auto_attach(). Remove the unnecessary function
that searches for the boardinfo.

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: addi_apci_3xxx: use the pci id_table 'driver_data'
H Hartley Sweeten [Tue, 5 Mar 2013 17:25:04 +0000 (10:25 -0700)]
staging: comedi: addi_apci_3xxx: use the pci id_table 'driver_data'

Create an enum to the boardinfo and pass that enum in the pci_driver
id_table as the driver_data.

Change the macro used to fill in the device table from PCI_DEVICE()
to PCI_VDEVICE(). This allows passing the enum as the next field.

Set the dev->board_ptr before calling addi_auto_attach(). This
removes the need for the common code to search for the boardinfo.

Since the search is not done we can remove the unnecessary board
information from the comedi_driver.

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: addi_apci_3200: use the pci id_table 'driver_data'
H Hartley Sweeten [Tue, 5 Mar 2013 17:24:43 +0000 (10:24 -0700)]
staging: comedi: addi_apci_3200: use the pci id_table 'driver_data'

Create an enum to the boardinfo and pass that enum in the pci_driver
id_table as the driver_data.

Change the macro used to fill in the device table from PCI_DEVICE()
to PCI_VDEVICE(). This allows passing the enum as the next field.

Set the dev->board_ptr before calling addi_auto_attach(). This
removes the need for the common code to search for the boardinfo.

Since the search is not done we can remove the unnecessary board
information from the comedi_driver.

For aesthetic reasons, move the pci device table near the pci_driver.

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: addi_apci_1564: set board_ptr before calling addi_auto_attach()
H Hartley Sweeten [Tue, 5 Mar 2013 17:24:21 +0000 (10:24 -0700)]
staging: comedi: addi_apci_1564: set board_ptr before calling addi_auto_attach()

This driver only supports a single PCI device. If we set the
dev->board_ptr before calling addi_auto_attach() we remove
the need for the common code to search for the boardinfo.

Since the search is not done we can remove the unnecessary
board information from the comedi_driver.

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: addi_apci_1500: set board_ptr before calling addi_auto_attach()
H Hartley Sweeten [Tue, 5 Mar 2013 17:24:00 +0000 (10:24 -0700)]
staging: comedi: addi_apci_1500: set board_ptr before calling addi_auto_attach()

This driver only supports a single PCI device. If we set the
dev->board_ptr before calling addi_auto_attach() we remove
the need for the common code to search for the boardinfo.

Since the search is not done we can remove the unnecessary
board information from the comedi_driver.

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: addi_apci_035: set board_ptr before calling addi_auto_attach()
H Hartley Sweeten [Tue, 5 Mar 2013 17:23:30 +0000 (10:23 -0700)]
staging: comedi: addi_apci_035: set board_ptr before calling addi_auto_attach()

This driver only supports a single PCI device. If we set the
dev->board_ptr before calling addi_auto_attach() we remove
the need for the common code to search for the boardinfo.

Since the search is not done we can remove the unnecessary
board information from the comedi_driver.

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: addi_common: allow driver to set the board_ptr
H Hartley Sweeten [Tue, 5 Mar 2013 17:23:10 +0000 (10:23 -0700)]
staging: comedi: addi_common: allow driver to set the board_ptr

The addi_apci_035, addi_apci_1500, addi_apci_1564, and addi_apci_3xxx
drivers still use the addi_common code. Allow those drivers to set
the dev->board_ptr before calling addi_auto_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: skel: cleanup the boardinfo
H Hartley Sweeten [Tue, 5 Mar 2013 17:22:48 +0000 (10:22 -0700)]
staging: comedi: skel: cleanup the boardinfo

For aesthetic reasons, add some whitespace to the boardinfo.

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: skel: use the pci id_table 'driver_data'
H Hartley Sweeten [Tue, 5 Mar 2013 17:22:31 +0000 (10:22 -0700)]
staging: comedi: skel: use the pci id_table 'driver_data'

Create an enum to the boardinfo and pass that enum in the pci_driver
id_table as the driver_data.

Change the macro used to fill in the device table from PCI_DEVICE()
to PCI_VDEVICE(). This allows passing the enum as the next field.

This allows removing the 'devid' data from the boardinfo as well the
search function that was used to locate the boardinfo for the PCI
device.

Cleanup some of the comments to describe the usage of the 'context'
in the (*auto_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: skel: cleanup pci_driver declaration
H Hartley Sweeten [Tue, 5 Mar 2013 17:22:06 +0000 (10:22 -0700)]
staging: comedi: skel: cleanup pci_driver declaration

For aesthetic reasons, add some whitespace to the pci_driver
declaration.

Also, move the pci device table near the pci_driver.

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: rtd520: use the pci id_table 'driver_data'
H Hartley Sweeten [Tue, 5 Mar 2013 17:21:47 +0000 (10:21 -0700)]
staging: comedi: rtd520: use the pci id_table 'driver_data'

Create an enum to the boardinfo and pass that enum in the pci_driver
id_table as the driver_data.

Change the macro used to fill in the device table from PCI_DEVICE() to
PCI_VDEVICE(). This allows passing the enum as the next field.

This allows removing the 'device_id' data from the boardinfo as well the
search function that was used to locate the boardinfo for the PCI device.

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: ni_pcimio: cleanup the boardinfo
H Hartley Sweeten [Tue, 5 Mar 2013 17:21:24 +0000 (10:21 -0700)]
staging: comedi: ni_pcimio: cleanup the boardinfo

For aesthetic reasons, add some whitespace to the boardinfo.

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: ni_stc.h: remove n_ni_boards macro
H Hartley Sweeten [Tue, 5 Mar 2013 17:21:03 +0000 (10:21 -0700)]
staging: comedi: ni_stc.h: remove n_ni_boards macro

This macro is not used, 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: ni_stc.h: remove boardtype macro
H Hartley Sweeten [Tue, 5 Mar 2013 17:20:41 +0000 (10:20 -0700)]
staging: comedi: ni_stc.h: remove boardtype macro

This macro relies on a local variable having a specific name and
returns an object that variable points to. This object is the
boardinfo used by the driver.

The comedi core provides the comedi_board() helper to return a
const pointer to the boardinfo. Remove the 'boardtype' macro and
fix all the users of the 'boardtype' macro to use the comedi_board()
helper to get the const boardinfo pointer.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: ni_pcimio: use the pci id_table 'driver_data'
H Hartley Sweeten [Tue, 5 Mar 2013 17:20:06 +0000 (10:20 -0700)]
staging: comedi: ni_pcimio: use the pci id_table 'driver_data'

Create an enum to the boardinfo and pass that enum in the pci_driver
id_table as the driver_data. A couple of the entries in the boardinfo
are #if 0'ed out due to unknown device ids. Add the enums for them
also but comment them out.

Change the macro used to fill in the device table from PCI_DEVICE() to
PCI_VDEVICE(). This allows passing the enum as the next field.

This allows removing the 'device_id' data from the boardinfo as well the
search function that was used to locate the boardinfo for the PCI device.

Remove the dev_info function trace noise in the attach.

Use the boardinfo 'board' pointer instead of accessing the data directly
with the 'boardtype' macro in 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: ni_pcidio: remove this_board macro
H Hartley Sweeten [Tue, 5 Mar 2013 17:19:36 +0000 (10:19 -0700)]
staging: comedi: ni_pcidio: remove this_board macro

This macro relies on a local variable having a specific name and
derives a pointer from that local variable.

It's only used in the attach and we already have the local variable
'board' that has the same information. 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>
11 years agostaging: comedi: ni_pcidio: remove n_ndio_boards macro
H Hartley Sweeten [Tue, 5 Mar 2013 17:18:04 +0000 (10:18 -0700)]
staging: comedi: ni_pcidio: remove n_ndio_boards macro

This macro is not 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: ni_pcidio: use the pci id_table 'driver_data'
H Hartley Sweeten [Tue, 5 Mar 2013 17:17:31 +0000 (10:17 -0700)]
staging: comedi: ni_pcidio: use the pci id_table 'driver_data'

Create an enum to the boardinfo and pass that enum in the pci_driver
id_table as the driver_data.

Change the macro used to fill in the device table from PCI_DEVICE() to
PCI_VDEVICE(). This allows passing the enum as the next field.

This allows removing the 'dev_id' data from the boardinfo as well the
search function that was used to locate the boardinfo for the PCI device.

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: ni_670x: use the pci id_table 'driver_data'
H Hartley Sweeten [Tue, 5 Mar 2013 17:17:07 +0000 (10:17 -0700)]
staging: comedi: ni_670x: use the pci id_table 'driver_data'

Create an enum to the boardinfo and pass that enum in the pci_driver
id_table as the driver_data.

Change the macro used to fill in the device table from PCI_DEVICE() to
PCI_VDEVICE(). This allows passing the enum as the next field.

This allows removing the 'dev_id' data from the boardinfo as well the
search function that was used to locate the boardinfo for the PCI device.

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: ni_660x: cleanup the boardinfo
H Hartley Sweeten [Tue, 5 Mar 2013 17:16:42 +0000 (10:16 -0700)]
staging: comedi: ni_660x: cleanup the boardinfo

For aesthetic reasons, add some whitespace to the boardinfo.

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: ni_660x: use the pci id_table 'driver_data'
H Hartley Sweeten [Tue, 5 Mar 2013 17:16:16 +0000 (10:16 -0700)]
staging: comedi: ni_660x: use the pci id_table 'driver_data'

Create an enum to the boardinfo and pass that enum in the pci_driver
id_table as the driver_data.

Change the macro used to fill in the device table from PCI_DEVICE() to
PCI_VDEVICE(). This allows passing the enum as the next field.

This allows removing the 'dev_id' data from the boardinfo as well the
search function that was used to locate the boardinfo for the PCI device.

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: ni_65xx: cleanup the boardinfo
H Hartley Sweeten [Tue, 5 Mar 2013 17:15:40 +0000 (10:15 -0700)]
staging: comedi: ni_65xx: cleanup the boardinfo

For aesthetic reasons, add some whitespace to the boardinfo.

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: ni_65xx: remove n_ni_65xx_boards macro
H Hartley Sweeten [Tue, 5 Mar 2013 17:15:15 +0000 (10:15 -0700)]
staging: comedi: ni_65xx: remove n_ni_65xx_boards macro

This macro is not 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: ni_65xx: remove board() helper function
H Hartley Sweeten [Tue, 5 Mar 2013 17:05:20 +0000 (10:05 -0700)]
staging: comedi: ni_65xx: remove board() helper function

This local helper function is a duplicate of the comedi core
privided comedi_board() helper. Use that function instead and
use a local variable to hold the boardinfo pointer instead of
calling the helper each time the boardinfo is accessed.

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: ni_65xx: use the pci id_table 'driver_data'
H Hartley Sweeten [Tue, 5 Mar 2013 17:04:52 +0000 (10:04 -0700)]
staging: comedi: ni_65xx: use the pci id_table 'driver_data'

Create an enum to the boardinfo and pass that enum in the pci_driver
id_table as the driver_data.

Change the macro used to fill in the device table from PCI_DEVICE() to
PCI_VDEVICE(). This allows passing the enum as the next field.

This allows removing the 'dev_id' data from the boardinfo as well the
search function that was used to locate the boardinfo for the PCI device.

Since we now have a local variable in the attach that has the boardinfo
pointer, use that instead of calling the local board() helper function
each time the boardinfo is accessed.

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: ni_65xx: cleanup pci_driver declaration
H Hartley Sweeten [Tue, 5 Mar 2013 17:04:22 +0000 (10:04 -0700)]
staging: comedi: ni_65xx: cleanup pci_driver declaration

For aesthetic reasons, add some whitespace to the pci_driver
declaration.

Also, move the pci device table near the pci_driver.

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: ni_6527: use the pci id_table 'driver_data'
H Hartley Sweeten [Tue, 5 Mar 2013 17:03:55 +0000 (10:03 -0700)]
staging: comedi: ni_6527: use the pci id_table 'driver_data'

Create an enum to the boardinfo and pass that enum in the pci_driver
id_table as the driver_data.

Change the macro used to fill in the device table from PCI_DEVICE() to
PCI_VDEVICE(). This allows passing the enum as the next field.

This allows removing the 'dev_id' data from the boardinfo as well the
search function that was used to locate the boardinfo for the PCI device.

For aesthetic reasons, add some whitespace to the boardinfo.

Remove the now unnecessary 'this_board' macro.

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: ni_6527: cleanup pci_driver declaration
H Hartley Sweeten [Tue, 5 Mar 2013 17:03:34 +0000 (10:03 -0700)]
staging: comedi: ni_6527: cleanup pci_driver declaration

For aesthetic reasons, add some whitespace to the pci_driver
declaration.

Also, move the pci device table near the pci_driver.

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: me_daq: use the pci id_table 'driver_data'
H Hartley Sweeten [Tue, 5 Mar 2013 17:03:09 +0000 (10:03 -0700)]
staging: comedi: me_daq: use the pci id_table 'driver_data'

Create an enum to the boardinfo and pass that enum in the pci_driver
id_table as the driver_data.

Change the macro used to fill in the device table from PCI_DEVICE() to
PCI_VDEVICE(). This allows passing the enum as the next field.

This allows removing the 'device_id' data from the boardinfo as well the
search function that was used to locate the boardinfo for the PCI device.

Since the PCI device ids are now only used in the id_table, remove the
defines and open code the device ids.

The me-2600i needs to have firmware uploaded to the board. Add a new
field to the boardinfo, 'needs_firmware', to indicate this.

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: me4000: use the pci id_table 'driver_data'
H Hartley Sweeten [Tue, 5 Mar 2013 17:02:47 +0000 (10:02 -0700)]
staging: comedi: me4000: use the pci id_table 'driver_data'

Create an enum to the boardinfo and pass that enum in the pci_driver
id_table as the driver_data.

Change the macro used to fill in the device table from PCI_DEVICE() to
PCI_VDEVICE(). This allows passing the enum as the next field.

This allows removing the 'device_id' data from the boardinfo as well the
search function that was used to locate the boardinfo for the PCI device.

Since the PCI device ids are now only used in the id_table, remove the
defines and open code the device ids.

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: use the pci id_table 'driver_data'
H Hartley Sweeten [Tue, 5 Mar 2013 17:01:59 +0000 (10:01 -0700)]
staging: comedi: dt3000: use the pci id_table 'driver_data'

Create an enum to the boardinfo and pass that enum in the pci_driver
id_table as the driver_data.

Change the macro used to fill in the device table from PCI_DEVICE() to
PCI_VDEVICE(). This allows passing the enum as the next field.

This allows removing the 'device_id' data from the boardinfo as well the
search function that was used to locate the boardinfo for the PCI device.

Since the PCI device ids are now only used in the id_table, remove the
defines and open code the device ids.

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: use the pci id_table 'driver_data'
H Hartley Sweeten [Tue, 5 Mar 2013 17:01:28 +0000 (10:01 -0700)]
staging: comedi: cb_pcidda: use the pci id_table 'driver_data'

Create an enum to the boardinfo and pass that enum in the pci_driver
id_table as the driver_data.

Change the macro used to fill in the device table from PCI_DEVICE() to
PCI_VDEVICE(). This allows passing the enum as the next field.

This allows removing the 'device_id' data from the boardinfo as well the
search function that was used to locate the boardinfo for the PCI device.

Since the PCI device ids are now only used in the id_table, remove the
defines and open code the device ids.

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 the boardinfo
H Hartley Sweeten [Tue, 5 Mar 2013 17:00:59 +0000 (10:00 -0700)]
staging: comedi: cb_pcidas64: cleanup the boardinfo

For aesthetic reasons, add some whitespace to the boardinfo.

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: use the pci id_table 'driver_data'
H Hartley Sweeten [Tue, 5 Mar 2013 17:00:39 +0000 (10:00 -0700)]
staging: comedi: cb_pcidas64: use the pci id_table 'driver_data'

Create an enum to the boardinfo and pass that enum in the pci_driver
id_table as the driver_data.

Change the macro used to fill in the device table from PCI_DEVICE() to
PCI_VDEVICE(). This allows passing the enum as the next field.

This allows removing the 'device_id' data from the boardinfo as well
the search function that was used to locate the boardinfo for the PCI
device.

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: use the pci id_table 'driver_data'
H Hartley Sweeten [Tue, 5 Mar 2013 17:00:15 +0000 (10:00 -0700)]
staging: comedi: cb_pcidas: use the pci id_table 'driver_data'

Create an enum to the boardinfo and pass that enum in the pci_driver
id_table as the driver_data.

Change the macro used to fill in the device table from PCI_DEVICE() to
PCI_VDEVICE(). This allows passing the enum as the next field.

This allows removing the 'device_id' data from the boardinfo as well
the search function that was used to locate the boardinfo for the PCI
device.

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: use the pci id_table 'driver_data'
H Hartley Sweeten [Tue, 5 Mar 2013 16:59:52 +0000 (09:59 -0700)]
staging: comedi: adv_pci_dio: use the pci id_table 'driver_data'

Create an enum to the boardinfo and pass that enum in the pci_driver
id_table as the driver_data.

Change the macro used to fill in the device table from PCI_DEVICE() to
PCI_VDEVICE(). This allows passing the enum as the next field.

This allows removing the 'vendor_id' and 'device_id' data from the
boardinfo as well the search function that was used to locate the
boardinfo for the PCI device.

The pci1753 and pci1753e boards have the same vendor/device id so it
is impossible to determine which board is actually detected. The
boardinfo for the boards is quite different. Group them in the same
enum index in the boardinfo table and #if out the information with
USE_PCI1753E_BOARDINFO. Until a better solution is worked out, this
will allow the driver to be compiled to support the pci1753 (default)
or pci1752e.

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: use the pci id_table 'driver_data'
H Hartley Sweeten [Tue, 5 Mar 2013 16:59:29 +0000 (09:59 -0700)]
staging: comedi: adv_pci1710: use the pci id_table 'driver_data'

Create an enum to the boardinfo and pass that enum in the pci_driver
id_table as the driver_data.

Change the macro used to fill in the device table from PCI_DEVICE() to
PCI_VDEVICE(). This allows passing the enum as the next field.

This allows removing the 'device_id' data from the boardinfo as well
the search function that was used to locate the boardinfo for the
PCI device.

The pci1710 and pci1710hg boards have the same vendor/device id so
it is impossible to determine which board is actually detected. The
boardinfo for the pci1710hg is identical to the pci1710 other than
the analog input range information. Remove the pci1710hg information
and #if out the range tables for that device with the define
USE_PCI1710HG_RANGE. Modify the pci1710 boardinfo accordingly to
use the same define to determine which range table to use. Until a
better solution is worked out, this will allow the driver to be
compiled to support the pci1710 (default) or pci1710hg.

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_pci7x3x: use the pci id_table 'driver_data'
H Hartley Sweeten [Tue, 5 Mar 2013 16:59:07 +0000 (09:59 -0700)]
staging: comedi: adl_pci7x3x: use the pci id_table 'driver_data'

Create an enum to the boardinfo and pass that enum in the pci_driver
id_table as the driver_data.

Change the macro used to fill in the device table from PCI_DEVICE() to
PCI_VDEVICE(). This allows passing the enum as the next field.

This allows removing the 'device' data from the boardinfo as well the
search function that was used to locate the boardinfo for the PCI device.

Since the PCI device ids are now only used in the id_table, remove the
defines and open code the device ids.

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: use the pci id_table 'driver_data'
H Hartley Sweeten [Tue, 5 Mar 2013 16:58:25 +0000 (09:58 -0700)]
staging: comedi: adl_pci6208: use the pci id_table 'driver_data'

Create an enum to the boardinfo and pass that enum in the pci_driver
id_table as the driver_data.

Change the macro used to fill in the device table from PCI_DEVICE() to
PCI_VDEVICE(). This allows passing the enum as the next field.

This allows removing the 'dev_id' data from the boardinfo as well the
search function that was used to locate the boardinfo for the PCI device.

Since the PCI device ids are now only used in the id_table, remove the
defines and open code the device ids.

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: addi_apci_3120: use the pci id_table 'driver_data'
H Hartley Sweeten [Tue, 5 Mar 2013 16:58:01 +0000 (09:58 -0700)]
staging: comedi: addi_apci_3120: use the pci id_table 'driver_data'

Create an enum to the boardinfo and pass that enum in the pci_driver
id_table as the driver_data.

Change the macro used to fill in the device table from PCI_DEVICE() to
PCI_VDEVICE(). This allows passing the enum as the next field.

This allows removing the 'i_VendorId' and 'i_DeviceId' data from the
boardinfo as well the search function that was used to locate the
boardinfo for the PCI device.

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: addi_apci_16xx: remove the boardinfo from the comedi_driver
H Hartley Sweeten [Tue, 5 Mar 2013 16:57:26 +0000 (09:57 -0700)]
staging: comedi: addi_apci_16xx: remove the boardinfo from the comedi_driver

This driver uses the comedi auto attach mechanism and does not need
to supply the 'num_names', 'board_name', and 'offset' fields so that
the comedi core can search the boardinfo. These fields are only used
for the legacy 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: addi_apci_16xx: use the pci id_table 'driver_data'
H Hartley Sweeten [Tue, 5 Mar 2013 16:56:51 +0000 (09:56 -0700)]
staging: comedi: addi_apci_16xx: use the pci id_table 'driver_data'

Create an enum to the boardinfo and pass that enum in the pci_driver
id_table as the driver_data.

Change the macro used to fill in the device table from PCI_DEVICE() to
PCI_VDEVICE(). This allows passing the enum as the next field.

This allows removing the 'vendor' and 'device' data from the boardinfo
as well the search function that was used to locate the boardinfo for
the PCI device.

Since the PCI device ids are now only used in the id_table, remove the
defines and open code the device ids.

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: addi_apci_1516: use the pci id_table 'driver_data'
H Hartley Sweeten [Tue, 5 Mar 2013 16:56:06 +0000 (09:56 -0700)]
staging: comedi: addi_apci_1516: use the pci id_table 'driver_data'

Create an enum to the boardinfo and pass that enum in the pci_driver
id_table as the driver_data.

Change the macro used to fill in the device table from PCI_DEVICE() to
PCI_VDEVICE(). This allows passing the enum as the next field.

This allows removing the 'device' data from the boardinfo as well the
search function that was used to locate the boardinfo for the PCI device.

Since the PCI device ids are now only used in the id_table, remove the
defines and open code the device ids.

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: 8255_pci: use the pci id_table 'driver_data'
H Hartley Sweeten [Tue, 5 Mar 2013 16:54:58 +0000 (09:54 -0700)]
staging: comedi: 8255_pci: use the pci id_table 'driver_data'

Create an enum to the boardinfo and pass that enum in the pci_driver
id_table as the driver_data.

Change the macro used to fill in the device table from PCI_DEVICE() to
PCI_VDEVICE(). This allows passing the enum as the next field.

This allows removing the 'vendor' and 'device' data from the boardinfo
as well the search function that was used to locate the boardinfo for
the PCI device.

Since the PCI device ids are now only used in the id_table, remove the
defines and open code the device ids.

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: comedi_pci: change the comedi_pci_auto_config() 'context'
H Hartley Sweeten [Tue, 5 Mar 2013 16:53:41 +0000 (09:53 -0700)]
staging: comedi: comedi_pci: change the comedi_pci_auto_config() 'context'

The comedi_pci_auto_config() function is used to allow the PCI driver
(*probe) function to automatically call the comedi driver (*auto_attach).
This allows the comedi driver to be part of the PnP process when the
PCI device is detected.

Currently the comedi_pci_auto_config() always passes a 'context' of '0'
to comedi_auto_config(). This makes the 'context' a bit useless.

Modify comedi_pci_auto_config() to allow the comedi pci drivers to pass
a 'context' from the PCI driver.

Make all the comedi pci drivers pass the pci_device_id 'driver_data' as
the 'context'. Since none of the comedi pci drivers currently set the
'driver_data' the 'context' will still be '0'.

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: sw_sync: sw_sync_timeline_ops can be static
Changlong Xie [Tue, 5 Mar 2013 05:39:39 +0000 (13:39 +0800)]
staging: sw_sync: sw_sync_timeline_ops can be static

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Changlong Xie <changlongx.xie@intel.com>
Acked-by: Erik Gilling <konkers@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: zcache: using strlcpy instead of strncpy
Chen Gang [Fri, 8 Mar 2013 00:47:50 +0000 (08:47 +0800)]
staging: zcache: using strlcpy instead of strncpy

  for NUL terminated string, need alway set '\0' in the end.

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: csr: csr_time.c: Fix coding style
SeongJae Park [Sat, 2 Mar 2013 01:45:17 +0000 (10:45 +0900)]
staging: csr: csr_time.c: Fix coding style

Signed-off-by: SeongJae Park <sj38.park@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: dgrp: Drop unnecessary typecast
Guenter Roeck [Thu, 28 Feb 2013 19:46:57 +0000 (11:46 -0800)]
staging: dgrp: Drop unnecessary typecast

An unnecessary typecast in dgrp_net_ops.c causes the following build error
if compiled with W=1.

In function ‘copy_from_user’, inlined from ‘dgrp_net_ioctl’ at
    drivers/staging/dgrp/dgrp_net_ops.c:3408:21:
    arch/x86/include/asm/uaccess_32.h:211:26: error: call to
    ‘copy_from_user_overflow’ declared with attribute error: copy_from_user()
    buffer size is not provably correct

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agortl8712: remove redundant if statement
Niklas Söderlund [Wed, 27 Feb 2013 19:40:06 +0000 (20:40 +0100)]
rtl8712: remove redundant if statement

Same result no matter what path is taken.

Signed-off-by: Niklas Söderlund <niso@kth.se>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agortl8712: remove unused definitions from rtl871x_recv.h
Niklas Söderlund [Thu, 28 Feb 2013 19:04:03 +0000 (20:04 +0100)]
rtl8712: remove unused definitions from rtl871x_recv.h

Signed-off-by: Niklas Söderlund <niso@kth.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agortl8712: remove dead function prototypes from rtl871x_recv.h
Niklas Söderlund [Thu, 28 Feb 2013 19:04:02 +0000 (20:04 +0100)]
rtl8712: remove dead function prototypes from rtl871x_recv.h

There is no implementation of these functions anywhere in the code.

Signed-off-by: Niklas Söderlund <niso@kth.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agortl8712: remove unused functions from rtl871x_recv.h
Niklas Söderlund [Thu, 28 Feb 2013 19:04:01 +0000 (20:04 +0100)]
rtl8712: remove unused functions from rtl871x_recv.h

Signed-off-by: Niklas Söderlund <niso@kth.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: update clock prepare count
Eduardo Valentin [Tue, 26 Feb 2013 22:53:38 +0000 (18:53 -0400)]
staging: omap-thermal: update clock prepare count

This patch changes the clock management code to also update
the clock prepare counter, this way we won't skip the enable/disable
operation due to prepare dependencies.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: name data files accordingly
Eduardo Valentin [Tue, 26 Feb 2013 22:53:37 +0000 (18:53 -0400)]
staging: omap-thermal: name data files accordingly

This patch simply changes the name of files containing data structure definition.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: Remove double conv_table reference
Eduardo Valentin [Tue, 26 Feb 2013 22:53:36 +0000 (18:53 -0400)]
staging: omap-thermal: Remove double conv_table reference

This patch removes from data structure the double reference of
the conversion table. It keeps the reference coming from bandgap
data definition. The patch also adapts the code accordingly.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: add DT example for OMAP54xx devices
Eduardo Valentin [Tue, 26 Feb 2013 22:53:35 +0000 (18:53 -0400)]
staging: omap-thermal: add DT example for OMAP54xx devices

Update documentation with DT example for OMAP54xx devices.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: update DT entry documentation
Eduardo Valentin [Tue, 26 Feb 2013 22:53:34 +0000 (18:53 -0400)]
staging: omap-thermal: update DT entry documentation

Simple update on documentation file for DT. This patch
also adds an example for OMAP4430 and 0MAP4470, and also updated
OMAP4460's example.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: introduze FREEZE_BIT feature
Eduardo Valentin [Tue, 26 Feb 2013 22:53:33 +0000 (18:53 -0400)]
staging: omap-thermal: introduze FREEZE_BIT feature

For ES2.0 devices, it is not guaranteed that current DTEMP
or DTEMP0 from the history buffer are going to contain
correct values, due to desynchronization between BG clk
and OCP clk.

For this reason, this patch changes the driver to first:
a. consider a feature flag, FREEZE_BIT, in order to check
it is possible to freeze the history buffer or not.
b. whenever reading the temperature, it will fetch from
DTEMP1 instead of DTEMP or DTEMP0.

This WA is applicable only for OMAP5430 ES2.0.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: remove dedicated counter register for OMAP5
Eduardo Valentin [Tue, 26 Feb 2013 22:53:32 +0000 (18:53 -0400)]
staging: omap-thermal: remove dedicated counter register for OMAP5

On OMAP54xx there is only one counter register. For this reason,
each domain must use the same counter register. This patch changes
the data definition to coupe with this.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: update feature bitfield for OMAP54xx
Eduardo Valentin [Tue, 26 Feb 2013 22:53:31 +0000 (18:53 -0400)]
staging: omap-thermal: update feature bitfield for OMAP54xx

This patch removes from OMAP54xx the features:
. CLK_CTRL
. COUNTER
. MODE_CONFIG

Because these features are not present in OMAP54xx ES2.0

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: update OMAP54xx clock sources
Eduardo Valentin [Tue, 26 Feb 2013 22:53:30 +0000 (18:53 -0400)]
staging: omap-thermal: update OMAP54xx clock sources

This patch updates the OMAP54xx data structure to use
the right clock source name for ES2.0.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: introduce new features of OMAP54xx
Eduardo Valentin [Tue, 26 Feb 2013 22:53:29 +0000 (18:53 -0400)]
staging: omap-thermal: introduce new features of OMAP54xx

On OMAP54xx ES2.0 there are new features inside the bandgap
device. This patch introduces the registers definition
to access these features and adapts the data structures
to map these new registers. The new features are:

. SIDLE mode
. Cumulative register
. History buffer.
. Buffer freeze bit
. Buffer clear bit

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: remove from register map soc and mode on OMAP5
Eduardo Valentin [Tue, 26 Feb 2013 22:53:28 +0000 (18:53 -0400)]
staging: omap-thermal: remove from register map soc and mode on OMAP5

On OMAP54xx ES2.0 there is no single read and only one mode: continuous
mode. For this reason, there is no point in defining register fields
for these operations.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: standardize register nomenclature to use 'GPU'
Eduardo Valentin [Tue, 26 Feb 2013 22:53:27 +0000 (18:53 -0400)]
staging: omap-thermal: standardize register nomenclature to use 'GPU'

In order to keep same nomenclature across the register definition,
this change will make all 'MM' suffixes to be named 'GPU'.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: update OMAP54xx conv_table
Radhesh Fadnis [Tue, 26 Feb 2013 22:53:26 +0000 (18:53 -0400)]
staging: omap-thermal: update OMAP54xx conv_table

This patch updates the ADC conversion table for OMAP5430 ES2.0 devices.

Signed-off-by: Radhesh Fadnis <radhesh.fadnis@ti.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: introduce clock feature flag
Radhesh Fadnis [Tue, 26 Feb 2013 22:53:25 +0000 (18:53 -0400)]
staging: omap-thermal: introduce clock feature flag

The clock to Bandgap module is SW controlled on some version of
OMAP silicon (OMAP44xx). But on OMAP54xx ES2.0
onwards this is HW-Auto controlled. Hence introduce a feature flag
to use/not-to-use SW enable/disable of BG clock.

Signed-off-by: Radhesh Fadnis <radhesh.fadnis@ti.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: Add print when TSHUT temperature reached
Ruslan Ruslichenko [Tue, 26 Feb 2013 22:53:24 +0000 (18:53 -0400)]
staging: omap-thermal: Add print when TSHUT temperature reached

To indicate that board was shut down due to TSHUT temperature reached
it is good to print some information message before shutting down.

Signed-off-by: Ruslan Ruslichenko <x0191366@ti.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agowlan-ng: add a bounds check
Dan Carpenter [Wed, 27 Feb 2013 05:13:45 +0000 (08:13 +0300)]
wlan-ng: add a bounds check

I'm not sure where these results come from, but it can't hurt to
add a sanity check the array offset.  The .results[] array on the
next line has HFA384x_CHINFORESULT_MAX (16) elements.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agowlan-ng: clean up prism2sta_inf_chinforesults()
Dan Carpenter [Wed, 27 Feb 2013 05:12:06 +0000 (08:12 +0300)]
wlan-ng: clean up prism2sta_inf_chinforesults()

This function is ugly because it hits against the 80 character
limit.  This patch does several things to clean it up.

1) Introduces "result" instead of inf->info.chinforesult.result[n].
2) Reverses the ".scanchannels & (1 << i)" so everthing can be
   pulled in one indent level.
3) Use "chan" instead of "channel".
4) Tweaks the line breaks to the call to pr_debug().

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: line6: pod.c: fix checkpatch warning
Laurent Navet [Mon, 25 Feb 2013 13:08:49 +0000 (14:08 +0100)]
staging: line6: pod.c: fix checkpatch warning

 - WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Laurent Navet <laurent.navet@gmail.com>
Reviewed-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: usbip: removed lines over 80 characters
Kurt Kanzenbach [Fri, 22 Feb 2013 11:13:34 +0000 (12:13 +0100)]
staging: usbip: removed lines over 80 characters

This patch fixes the following checkpatch warning:
-WARNING: line over 80 characters

Signed-off-by: Kurt Kanzenbach <ly80toro@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: usbip: userspace: fix whitespace errors
Stefan Reif [Fri, 22 Feb 2013 11:13:33 +0000 (12:13 +0100)]
staging: usbip: userspace: fix whitespace errors

This patch fixes the following checkpatch errors:
-ERROR: space required after that ','
-ERROR: spaces required around that '='
-ERROR: space prohibited before that close parenthesis
-WARNING: please, no space before tabs

Signed-off-by: Stefan Reif <ke42caxa@cip.cs.fau.de>
Signed-off-by: Kurt Kanzenbach <ly80toro@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: usbip: remove unnecessary braces
Stefan Reif [Fri, 22 Feb 2013 11:13:32 +0000 (12:13 +0100)]
staging: usbip: remove unnecessary braces

This patch fixes the following checkpatch warning:
-WARNING: braces {} are not necessary for any arm of this statement

Signed-off-by: Stefan Reif <ke42caxa@cip.cs.fau.de>
Signed-off-by: Kurt Kanzenbach <ly80toro@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: usbip: userspace: libsrc: added missing space
Kurt Kanzenbach [Fri, 22 Feb 2013 11:13:31 +0000 (12:13 +0100)]
staging: usbip: userspace: libsrc: added missing space

This patch fixes the following checkpatch warning:
-WARNING: missing space after enum definition

Signed-off-by: Kurt Kanzenbach <ly80toro@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: usbip: userspace: libsrc: removed assignments in if conditions
Kurt Kanzenbach [Fri, 22 Feb 2013 11:13:30 +0000 (12:13 +0100)]
staging: usbip: userspace: libsrc: removed assignments in if conditions

This patch fixes the following checkpatch error:
-ERROR: do not use assignment in if condition

Signed-off-by: Kurt Kanzenbach <ly80toro@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: usbip: userspace: libsrc: replaced lines over 80 characters
Kurt Kanzenbach [Fri, 22 Feb 2013 11:13:29 +0000 (12:13 +0100)]
staging: usbip: userspace: libsrc: replaced lines over 80 characters

This patch fixes some of the following checkpatch warnings:
-WARNING: line over 80 characters

We did not split format strings for readability.

Signed-off-by: Kurt Kanzenbach <ly80toro@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: usbip: userspace: libsrc: (foo*) should be (foo *)
Kurt Kanzenbach [Fri, 22 Feb 2013 11:13:28 +0000 (12:13 +0100)]
staging: usbip: userspace: libsrc: (foo*) should be (foo *)

This patch fixes the following checkpatch error:
-ERROR: "(foo*)" should be "(foo *)"

Signed-off-by: Kurt Kanzenbach <ly80toro@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: usbip: userspace: libsrc: spaces required around that '='
Kurt Kanzenbach [Fri, 22 Feb 2013 11:13:27 +0000 (12:13 +0100)]
staging: usbip: userspace: libsrc: spaces required around that '='

This patch fixes the following checkpatch error:
-ERROR: spaces required around that '='

Signed-off-by: Kurt Kanzenbach <ly80toro@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: usbip: userspace: libsrc: do not init static/globals to 0
Kurt Kanzenbach [Fri, 22 Feb 2013 11:13:26 +0000 (12:13 +0100)]
staging: usbip: userspace: libsrc: do not init static/globals to 0

This patch fixes the following checkpatch errors:
-ERROR: do not initialise statics to 0 or NULL
-ERROR: do not initialise globals to 0 or NULL

Signed-off-by: Kurt Kanzenbach <ly80toro@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: usbip: userspace: libsrc: fix indention
Kurt Kanzenbach [Fri, 22 Feb 2013 11:13:25 +0000 (12:13 +0100)]
staging: usbip: userspace: libsrc: fix indention

This patch fixes the following checkpatch warning:
-ERROR: code indent should use tabs where possible
-WARNING: suspect code indent for conditional statements

Signed-off-by: Kurt Kanzenbach <ly80toro@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: silicom: Remove redundant NULL check before kfree
Syam Sidhardhan [Wed, 6 Mar 2013 20:14:54 +0000 (01:44 +0530)]
staging: silicom: Remove redundant NULL check before kfree

kfree on NULL pointer is a no-op.

Signed-off-by: Syam Sidhardhan <s.syam@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: silicom: bp_mod: Removed trailing whitespaces
Alexandru Gheorghiu [Tue, 26 Feb 2013 14:53:16 +0000 (16:53 +0200)]
Staging: silicom: bp_mod: Removed trailing whitespaces

Fixed coding style issue.

Signed-off-by: Alexandru Gheorghiu <gheorghiuandru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: fix all sparse warnings in silicom/bypasslib/
Randy Dunlap [Thu, 21 Feb 2013 02:32:28 +0000 (18:32 -0800)]
staging: fix all sparse warnings in silicom/bypasslib/

Fix all sparse warning in drivers/staging/silicom/bypasslib/,
e.g.:

drivers/staging/silicom/bypasslib/bypass.c:471:21: warning: non-ANSI function declaration of function 'init_lib_module'
drivers/staging/silicom/bypasslib/bypass.c:478:25: warning: non-ANSI function declaration of function 'cleanup_lib_module'
drivers/staging/silicom/bypasslib/bypass.c:137:5: warning: symbol 'is_bypass_dev' was not declared. Should it be static?
drivers/staging/silicom/bypasslib/bypass.c:182:5: warning: symbol 'is_bypass' was not declared. Should it be static?
drivers/staging/silicom/bypasslib/bypass.c:192:5: warning: symbol 'get_bypass_slave' was not declared. Should it be static?
drivers/staging/silicom/bypasslib/bypass.c:197:5: warning: symbol 'get_bypass_caps' was not declared. Should it be static?
drivers/staging/silicom/bypasslib/bypass.c:202:5: warning: symbol 'get_wd_set_caps' was not declared. Should it be static?
etc.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging/gdm72xx: Remove duplicated code in gdm_qos.c
Peter Huewe [Tue, 19 Feb 2013 17:50:20 +0000 (18:50 +0100)]
staging/gdm72xx: Remove duplicated code in gdm_qos.c

The first branch of the if statement is ended with a return thus there
is no need for an else if, and thus we can move the duplicated code to
the top and use it for the other two branches.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging/gdm72xx: Remove unused variable in gdm_qos.c
Peter Huewe [Tue, 19 Feb 2013 17:50:19 +0000 (18:50 +0100)]
staging/gdm72xx: Remove unused variable in gdm_qos.c

len is never read after assignment, thus can be removed.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging/gdm72xx: Include corresponding header file (fix sparse warning)
Peter Huewe [Tue, 19 Feb 2013 17:50:18 +0000 (18:50 +0100)]
staging/gdm72xx: Include corresponding header file (fix sparse warning)

sdio_boot.c and netlink_k.c both have a corresponding header file with
their function prototypes but fail to include them, which leads to the
following sparse warnings:
sdio_boot.c:135:5: warning: symbol 'sdio_boot' was not declared. Should it be static?
netlink_k.c:89:13: warning: symbol 'netlink_init' was not declared. Should it be static?
netlink_k.c:109:6: warning: symbol 'netlink_exit' was not declared. Should it be static?
netlink_k.c:114:5: warning: symbol 'netlink_send' was not declared. Should it be static?

-> Add the include files and silence the warning

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: slicoss: Remove dma_addr_t cast compilation warnings
Joe Perches [Wed, 27 Feb 2013 00:33:11 +0000 (16:33 -0800)]
staging: slicoss: Remove dma_addr_t cast compilation warnings

Eliminate some warnings by casting to unsigned long before
casting a dma_addr_t value to a pointer.

btw:

Does slicoss always work on x86-32?
Is a pshmem guaranteed to be accessible
by a 32 bit address?

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging/sm7xxfb: Convert to SIMPLE_DEV_PM_OPS
Peter Huewe [Mon, 18 Feb 2013 23:12:48 +0000 (00:12 +0100)]
staging/sm7xxfb: Convert to SIMPLE_DEV_PM_OPS

Instead of assigning the pm_ops fields individually we can simply use
SIMPLE_DEV_PM_OPS.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Acked-by: Javier Muñoz <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging/slicoss: Use ether_crc for mac hash calculation
Peter Huewe [Tue, 19 Feb 2013 04:18:52 +0000 (05:18 +0100)]
staging/slicoss: Use ether_crc for mac hash calculation

Instead of performing the hash calculation for the mac address by ourself, we
can simply reuse ether_crc and shift only the result according to our
needs.
The code was tested against the previous implementation by verifying both
implementations against each other in userspace for 16200000000 different
mac addresses, changing the vendor bits of the mac address first.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging/slicoss: Fix buffer possible overflow in slic_card_locate
Peter Huewe [Tue, 19 Feb 2013 04:18:51 +0000 (05:18 +0100)]
staging/slicoss: Fix buffer possible overflow in slic_card_locate

smatch complains about a possible buffer overflow
slicoss.c:3651 slic_card_locate() error: buffer overflow
'physcard->adapter' 4 <= 4

If the for loop is not exited prematurely i++ is executed after the last
iteration and thus i can be 4, which is out of bounds for
physcard->adapter.

-> Add check for this condition and simplify the if statement by
inverting the condition.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging/slicoss: Fix operation may be undefined warning
Peter Huewe [Tue, 19 Feb 2013 04:18:50 +0000 (05:18 +0100)]
staging/slicoss: Fix operation may be undefined warning

gcc complains about an undefined operation:
slicoss.c:1417:19: warning: operation on 'rspq->pageindex' may be
undefined [-Wsequence-point]

The intended operation was (probably) to retrieve the pageindex + 1 and let
it wrap around if it reaches the num_pages.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging/slicoss: Remove always true if statement
Peter Huewe [Tue, 19 Feb 2013 04:18:49 +0000 (05:18 +0100)]
staging/slicoss: Remove always true if statement

skbtype is assigned once to NORMAL_ETHFRAME and then checked if it is
NORMAL_ETHFRAME -> remove the checks.

This also gets rid of the (false positive) smatch warning:
slicoss.c:2829 slic_xmit_start() error: potential NULL dereference
'hcmd'.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging/slicoss: Check pointer before dereferencing
Peter Huewe [Tue, 19 Feb 2013 04:13:50 +0000 (05:13 +0100)]
staging/slicoss: Check pointer before dereferencing

Smatch complains that the variable adapter is dereferenced before it is
checked:
slicoss.c:906 slic_timer_load_check() warn: variable dereferenced before
check 'adapter' (see line 904)

-> move the assignment after the check.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: vt6656: removed no longer useful ttype.h file
Andres More [Tue, 26 Feb 2013 01:32:55 +0000 (20:32 -0500)]
staging: vt6656: removed no longer useful ttype.h file

Removed includes and added linux/types.h instead when needed.

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>