summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2012-10-27Staging: csr: remove CSRMIN() macroGreg Kroah-Hartman
Use the in-kernel min_t() macro for the one place it was being used. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-26Staging: csr: csr_macro.h: remove unused macrosGreg Kroah-Hartman
Remove a bunch of unused #defines. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-26Staging: csr: remove __cplusplus nonsense from the .h filesGreg Kroah-Hartman
In the kernel, we use C. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-26staging:comedi: Use pr_ or dev_ printks in drivers/usbduxfaxt.cYAMANE Toshiaki
fixed below checkpatch warnings. -WARNING: printk() should include KERN_ facility level Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-26staging: csr: remove unused macros and prototypesDevendra Naga
this file includes prototypes that doesnt have a function for them, and some macros which are never used, remove them instead Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-26staging: csr: remove unused macros/ prototypes in csr_sched.hDevendra Naga
there are macros and functions that are not used, or their function is missing, so remove them. Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-26Staging: remove telephony driversGreg Kroah-Hartman
We said we would wait until the 3.6 kernel release to remove these drivers. So we waited 6 months longer, that should be fine. If anyone wants them back, it is trivial to revert these, but given that I don't think they even build anymore, I doubt anyone will want them. Cc: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-26staging: slicoss: fix a leak when kzalloc failDevendra Naga
slic_card_locate does a kzalloc of physcard, and if it fails, in my previous patch i returned -ENOMEM, but left the driver leak the memory if card_hostid == SLIC_HOSTID_DEFAULT, fix this memory leak if the above condition is true Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-26staging: r8712u: cleanup pointer type in r8712_setassocsta_cmd()Dan Carpenter
This seems like a cut and paste bug. Smatch complains that we don't allocate enough memory for a set_stakey_rsp struct. In fact this is used as a set_assocsta_rsp struct throughout and that also matches the name of the function. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-26staging: comedi: me_daq: remove some obvious commentsH Hartley Sweeten
These comments are just extra cruft. 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>
2012-10-26staging: comedi: me_daq: cleanup me_ai_insn_read()H Hartley Sweeten
Fix the use of insn->chanspec with the CR_CHAN, CR_RANGE, and CR_AREF macros. insn->chanspec is an unsigned int not an array. Cleanup the comments when creating the 'val' to write to the channel list fifo so that the code is a bit more readable. Use the 'val' variable when getting the value from the ADC fifo and then munging the data. This cleans up the goofy line breaks. This function still does not follow the expectations of the comedi core. It is supposed to read insn->n values from the channel and return those values. Currently it only reads a single value. 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>
2012-10-26staging: comedi: me_daq: cleanup me_dio_insn_bits()H Hartley Sweeten
This function only needs to update the output channel state when the 'mask' (data[0]) indicates that the state is changing. It's also supposed to return the state for all the input and output channels in data[1]. This function appears to work correctly but it's coded quite differently form the other comedi drivers. Rework the function so it follows the normal form. Also, use a couple local variables for the mmio addresses used to read/write the dio ports. 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>
2012-10-26staging: comedi: me_daq: fix me_dio_insn_config()H Hartley Sweeten
Currently this function does not work like the comedi code expects. Fix the function so that it checks the instruction, data[0], and does the correct action based on 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>
2012-10-26staging: comedi: me_daq: simplify analog output boardinfoH Hartley Sweeten
The boards supported by this driver either have analog outputs or don't have them. Add a new boardinfo value, 'has_ao', to indicate this. The boards that have analog outputs always have 4, 12-bit channels. Remove the unnecessary boardinfo and just open-code the values in the subdevice initialization. The boards with analog outputs also share the same output range capabilities. Rename the comedi_lrange to make it common for all board types. 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>
2012-10-26staging: comedi: me_daq: all boards have the same analog input specsH Hartley Sweeten
All the boards supported by this driver have the same analog input specifications. Remove the unnecessary boardinfo and just open-code the values in the subdevice initialization. The boards also share the same analog input range capabilities. Remove one of the duplicate tables and rename the other to make it common for all board types. 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>
2012-10-26staging: comedi: me_daq: cleanup the copyright and comedi commentsH Hartley Sweeten
Reformat the copyright and driver description comments to follow the preferred block comment style. Reword the driver description to follow comedi style described in the skel 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>
2012-10-26staging: comedi: me_daq: remove incomplete analog input command supportH Hartley Sweeten
The analog input subdevice functions me_ai_do_cmd_test() and me_ai_do_cmd() are only stubbed in. They both just return 0. The me_ai_cancel() function does have code to stop any running conversions but the me_ai_insn_read() function does that also. Just remove the incomplete functions and remove SDF_CMD_READ from the subdevice_flags. 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>
2012-10-26staging: comedi: me_daq: fix me_ao_insn_write()H Hartley Sweeten
This function is supposed to write to a single analog output channel. The channel number is packed in insn->chanspec, which is an unsigned int, and unpacked using the CR_CHAN() macro. Currently this function is trying to use the chanspec as an array. This works only if a single value is written. Fix the function so that the desired channel is determined and all the data is written to that channel. Also, fix the return. The comedi core expects insn_read functions to return the number of data values (insn->n). 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>
2012-10-26staging: comedi: me_daq: fix me_ao_insn_read()H Hartley Sweeten
This function is supposed to return the analog output value for a specified channel. The channel number is packed in insn->chanspec, which is an unsigned int, and unpacked using the CR_CHAN() macro. Currently this function is trying to use the chanspec as an array. This works only if a single data value is read. Fix the function so that the desired channel is determined and all the data returned is from that channel. Also, fix the return. The comedi core expects insn_read functions to return the number of data values (insn->n). 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>
2012-10-26staging: comedi: me_daq: remove pci_dev_put() in detachH Hartley Sweeten
This driver uses the comedi auto config mechanism and does not walk the pci bus to find the pci_dev. It should not be calling pci_dev_put() to decrement the ref count. 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>
2012-10-26staging: comedi: me_daq: add some whitespace to the subdevice initH Hartley Sweeten
To improve the readability, add some whitespace to the subdevice init. 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>
2012-10-26staging: comedi: me_daq: cleanup the range tablesH Hartley Sweeten
Fix the whitespace. 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>
2012-10-26staging: comedi: me_daq: cleanup the boardinfoH Hartley Sweeten
Rename the boardinfo variables so they are a bit more concise. Remove the unnecessary comments in the boardinfo. Add some whitespace to make the code more readable. 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>
2012-10-26staging: comedi: me_daq: remove dio_channel_nbr from boardinfoH Hartley Sweeten
All the boards supported by this driver have 32 dio channels. Remove the boardinfo and just open code the value 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>
2012-10-26staging: comedi: me_daq: remove {ao,ai}_resoultion_maskH Hartley Sweeten
These values can be determined from the {ao,ai}_resolution. 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>
2012-10-26staging: comedi: me_daq: remove '0' and 'NULL' entries in boardinfoH Hartley Sweeten
These entries will default to '0' or 'NULL' as appropriate. 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>
2012-10-26staging: comedi: me_daq: analog output subdevice could be unusedH Hartley Sweeten
One of the boards supported by this driver does not have analog outputs. Fix the attach code to account for 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>
2012-10-26staging: comedi: me_daq: factor out the PLX bug workaroundH Hartley Sweeten
Factor out the code in me_attach_pci() that handles the PLX-Bug workaround to a separate function. This looks odd. It appears that the bug workaround either swaps PCI bars 0 and 5 or it modifies PCI bar 0. Shouldn't this happen before PCI bar 0 is ioremap'ed? 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>
2012-10-26staging: comedi: me_daq: pass on the error from comedi_pci_enable()H Hartley Sweeten
Instead of returning -EIO when comedi_pci_enable() fails, pass on the actual error code. Also, remove the kernel noise when the function fails. 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>
2012-10-26staging: comedi: me_daq: replace 'result' and 'error' with 'ret'H Hartley Sweeten
Two local variables are used in me_attach_pci() to check for errors when calling other functions, 'result' and 'error'. Remove both of them and just use a common 'ret' variable. 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>
2012-10-26staging: comedi: me_daq: cleanup ioremap of PCI bar 2H Hartley Sweeten
PCI bar 2 is the main i/o address for this driver. Currently the pci_resource_len of the bar is stored in the private data but it is never used. Remove 'me_regbase_size' from the private data. Also, remove the local variables used for the pci_resource_start and _len. Just pass the values directly to the ioremap(). Remove the kernel noise when the ioremap fails. 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>
2012-10-26staging: comedi: me_daq: fix pointer dereference in me_detach()H Hartley Sweeten
As pointed out by Dan Carpenter, dev_private could be NULL when it is checked before calling comedi_pci_disable(). The private data variable 'plx_regbase_size' is only used to see if the pci device has been enabled. Remove that variable from the private data and just use the unused dev->iobase variable to let the detach know that the pci device is enabled. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-26staging: comedi: dt3000: change return type of dt3k_send_cmd to voidH Hartley Sweeten
None of the callers check the return value. Just make it a void. Flip the status check at the end of the function to check for an error before outputing the dev_dbg(). Use __func__ for the function name in 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>
2012-10-26staging: comedi: dt3000: remove empty 'else' codeH Hartley Sweeten
There are a number of: } else { /* not supported */ } cases in this driver. 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>
2012-10-26staging: comedi: dt3000: remove dev_dbg() noiseH Hartley Sweeten
Remove most of the dev_dbg() output from this driver. Most of it is just noise. For now I have left the dev_dbg() in the dt3k_send_cmd() function. I still have not quite figured out how the low-level i/o works in this 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>
2012-10-26staging: comedi: dt3000: add some whitespace to the subdevice initH Hartley Sweeten
To improve the readability, add some whitespace to the subdevice init. 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>
2012-10-26staging: comedi: dt3000: add a simple dev_info() when attachedH Hartley Sweeten
When the board is finished with the attach output a simple dev_info() 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>
2012-10-26staging: comedi: dt3000: cleanup the boardinfoH Hartley Sweeten
Add some whitespace to make the code more readable. 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>
2012-10-26staging: comedi: dt3000: remove '0' entries in boardinfoH Hartley Sweeten
These entries will default to '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>
2012-10-26staging: comedi: dt3000: remove forward declarationsH Hartley Sweeten
Move some of the functions to remove the need for the forward declarations. 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>
2012-10-26staging: comedi: dt3000: add defines for the PCI device idsH Hartley Sweeten
The PCI device ids supported by this driver are used multiple places in the code. To improve maintainability, create #define's for 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>
2012-10-26staging: comedi: dt3000: cleanup the range tablesH Hartley Sweeten
Use the BIP_RANGE() macro instead of the more generic RANGE() macro. Cleanup the whitespace. 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>
2012-10-26staging: comedi: dt3000: convert driver to attach_pciH Hartley Sweeten
Convert this driver to use the comedi PCI auto config mechanism by adding an attach_pci callback. Since this driver requires no extra configuration options, and the attach callback is now optional, remove it. Remove the kernel noise that is output when the attach fails for various reasons. Use the found 'dev->board_name' for the resource name passed to comedi_pci_enable() and request_irq(). Pass on the error returned from request_irq() instead of returning -EINVAL on error. Since this driver no longer walks the pci bus to find the pci_dev, remove the pci_dev_put() in the detach. 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>
2012-10-26staging: comedi: dt3000: remove this_board macroH Hartley Sweeten
This macro relies on a local variable having a specific name. Remove it and use the comedi_board() helper to get the 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>
2012-10-26staging: comedi: skel: use module_comedi_driver to simplify the codeWei Yongjun
Use the module_comedi_driver() macro to make the code simpler by eliminating module_init and module_exit calls. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-26staging: comedi: use module_comedi_driver to simplify the codeWei Yongjun
Use the module_comedi_driver() macro to make the code simpler by eliminating module_init and module_exit calls. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-26staging: ced1401: usb1401: remove unused including <linux/version.h>Wei Yongjun
Remove including <linux/version.h> that don't need it. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-26staging/comedi: Use pr_ or dev_ printks in drivers/gsc_hpdi.cYAMANE Toshiaki
fixed below checkpatch warning. - WARNING: Prefer netdev_warn(netdev, ... then dev_warn(dev, ... then pr_warn(... to printk(KERN_WARNING ... some of them have been replaced by dev_dbg. Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-26staging: csr: remove csrPanic and CSR_LOG_ASSERT and CSR_LOG_ASSERT_ENABLEDevendra Naga
these are not called at anypoint or enabled at anyplace in the code, remove them Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-26staging: csr: remove all prototypes of not defined functionsDevendra Naga
these prototypes doesn't have function definitions in any of the c files Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>