Eduardo Valentin [Fri, 15 Mar 2013 12:59:54 +0000 (08:59 -0400)]
staging: omap-thermal: fix error checking
The omap_bandgap_get_sensor_data() function returns ERR_PTR(),
but it can also return NULL, in case of initilization, so we need to use
IS_ERR_OR_NULL() rather than only IS_ERR().
Eduardo Valentin [Fri, 15 Mar 2013 12:59:51 +0000 (08:59 -0400)]
staging: omap-thermal: create header for register, bitfields and definitions
In order to have a better code readability and organization, this patch
splits omap-bandgap.h into three headers.
. omap-bandgap.h will contain only the driver related data structures
definitions and macros
. omap4xxx-bandgap.h will contain only defines and bitfields
related to OMAP4 based devices
. omap5xxx-bandgap.h will contain only defines and bitfields
related to OMAP5 based devices
This driver has been nothing but trouble, and no one shipping a new
Android device uses it, so let's just drop it, making the USB Gadget
driver authors lives a whole lot easier as they do their rework.
Cc: John Stultz <john.stultz@linaro.org> Cc: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: addi_apci_1710: only pci bar 2 is used
This driver used to be tied to the addi-data common code which
always saved the start address of pci bars 0, 1, 2, and 3 for
use by the driver. This driver only uses pci bar 2.
Remove all the non-used pci bars and move the saving of pci bar
2 so it occurs right after the pci device is enabled.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi_pci: pass comedi_device to comedi_pci_enable()
Make comedi_pci_enable() use the same parameter type as
comedi_pci_disable(). This also allows comedi_pci_enable
to automatically determine the resource name passed to
pci_request_regions().
Make sure the errno value returned is passed on instead of
assuming an errno. Also, remove any kernel noise that is
generated when the call fails.
The National Instruments drivers that use the mite module
currently enable the PCI device in the mite module. For
those drivers move the call to comedi_pci_enable into the
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>
staging: comedi_pci: make comedi_pci_disable() safe to call
Currently all the comedi PCI drivers need to do some checking in
their (*detach) before calling comedi_pci_disable() in order to
make sure the PCI device has actually be enabled.
Change the parameter passed to comedi_pci_disable() from a struct
pci_dev pointer to a comedi_device pointer and have comedi_pci_disable()
handle all the checking.
For most comedi PCI drivers this also allows removing the local
variable holding the pointer to the pci_dev. For some of the drivers
comedi_pci_disable can now be used directly as the (*detach) function.
The National Instruments drivers that use the mite module currently
enable/disable the PCI device in the mite module. For those drivers
move the call to comedi_pci_disable into the driver and make sure
dev->iobase is set to a non-zero value.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Paul Bolle [Thu, 14 Mar 2013 09:41:39 +0000 (10:41 +0100)]
staging: android: remove dependency on TINY_SHMEM
The Kconfig entry for the "Anonymous Shared Memory Subsystem" got added
in v3.3. It has an optional dependency on TINY_SHMEM. But TINY_SHMEM had
already been removed in v2.6.29. So this optional dependency can safely
be removed too.
Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Devendra Naga [Thu, 14 Mar 2013 06:40:28 +0000 (02:40 -0400)]
staging: csr: fix compilation warning in unifi_siwscan
got the warnings
drivers/staging/csr/sme_wext.c: In function ‘unifi_siwscan’:
drivers/staging/csr/sme_wext.c:1276:9: warning: variable ‘scantype’ set but not used [-Wunused-but-set-variable]
Ian Abbott [Tue, 12 Mar 2013 14:14:37 +0000 (14:14 +0000)]
staging: comedi: adv_pci1710: restore PCI-1710HG support
The Advantech PCI-1710HG is similar to the PCI-1710 but has a different
set of ranges for analog input (HG = high gain). Because they share the
same PCI vendor and device ID, the adv_pci1710 driver does not currently
distinguish them. This is more of a problem since auto-configuration
code was added to the driver (and manual configuration support removed),
as the PCI-1710HG would be automatically configured as a PCI-1710. More
recently, the unused code for PCI-1710HG support was #ifdef'ed out.
In fact, the PCI-1710 and PCI-1710HG can be distinguished by considering
the PCI subvendor and subdevice IDs according to the following table:
The above information is extracted from Advantech's own GPL'ed Linux
(non-Comedi) driver source from "advdaq-1.10.0001-1.tar.bz2" on their
website.
(0x13fe = PCI_VENDOR_ID_ADVANTECH, 0x10b5 = PCI_VENDOR_ID_PLX, 0x9050 =
PCI_DEVICE_ID_PLX_9050, 0x1000 = PCI_VENDOR_ID_NCR or
PCI_VENDOR_ID_LSI_LOGIC but I assume this subvendor ID was chosen
"randomly".)
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Paul Zimmerman [Tue, 12 Mar 2013 00:47:59 +0000 (17:47 -0700)]
staging: HCD files for the DWC2 driver
These files contain the HCD code, and implement the Linux
hc_driver API. Support for both slave mode and buffer DMA mode
of the controller is included.
Signed-off-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Paul Zimmerman [Tue, 12 Mar 2013 00:47:58 +0000 (17:47 -0700)]
staging: Core files for the DWC2 driver
The core code provides basic services for accessing and managing
the DWC_otg hardware. These services are used by both the Host
Controller Driver and (in future) the Peripheral Controller Driver.
Signed-off-by: Paul Zimmerman <paulz@synopsys.com> Reviewed-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Add support for the Network Accelerator Engine on Netlogic XLR/XLS
MIPS SoCs. The XLR/XLS NAE blocks can be configured as one 10G
interface or four 1G interfaces. This driver supports blocks
with 1G ports.
Wei Yongjun [Mon, 11 Mar 2013 13:45:34 +0000 (21:45 +0800)]
staging: sync: fix return value check in sync_fence_alloc()
In case of error, the function anon_inode_getfile() returns
ERR_PTR() and never returns NULL. The NULL test in the return
value check should be replaced with IS_ERR().
The (*insn_read) and (*insn_write) functions for all the subdevices
in this driver are the same except for the 'offset' that is added
to the iobase and channel to read/write a register on the board.
Pass the 'offset' in s->private so we can use the same (*insn_read)
and (*insn->write) functions for all the subdevices.
Also, fix the (*insn_read) and (*insn_write) functions so they work
correctly. The comedi core expects them to read/write insn->n data
values and then return the number of values used.
For aesthetic reasons, add some whitespace to the subdevice init.
Remove the dev_info() noise at the end of 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>