Commit graph

549867 commits

Author SHA1 Message Date
Luis de Bethencourt 168a2c1028 staging: rtl8712: braces should be used on all arms
Fix all instances of the following checkpatch.pl check:
CHECK: braces {} should be used on all arms of this statement

Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:26:59 -07:00
Luis de Bethencourt 1ca96884b1 staging: rtl8712: Remove boolean comparisons
Boolean tests do not need explicit comparison to true or false.

Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:26:59 -07:00
Muhammad Falak R Wani cf31378ba7 staging: ion: Remove explicit NULL comparison
Rewrite explicit NULL comparison in its simpler form.
<smpl>
@NULL_REPLACE@
expression e;
@@

-e == NULL
+ !e

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:26:59 -07:00
Luis de Bethencourt 7346489110 staging: rtl8188eu: fix misleading indentation
Code is correct, i needs to be moved back by 2 to correct for the last
iteration of the while loop, since READ_NEXT_PAIR advances two. Fixing
the misleading indentation.

Fix a smatch warning:
drivers/staging/rtl8188eu/hal/rf_cfg.c:217
rtl88e_phy_config_rf_with_headerfile() warn: curly braces intended?

Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:25:13 -07:00
Anish Bhatt 9c68ed09fe rtl8188eu : BIT() macro cleanup
Use the BIT(x) macro directly instead using multiple
BITX defines.

Signed-off-by: Anish Bhatt <anish@gatech.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:25:13 -07:00
Mateusz Kulikowski b0dcce5fbf staging: rtl8192e: _rtl92e_fw_boot_cpu: Remove unneeded goto
Drop ugly label as no resource cleanup is needed.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:23:13 -07:00
Mateusz Kulikowski 91d7b8cf7c staging: rtl8192e: fw: Use netdev_dbg instead of RT_TRACE
Drop legacy logging system.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:23:13 -07:00
Mateusz Kulikowski 15d140664c staging: rtl8192e: Remove _rtl92e_fw_download_code()
Reuse  rtl92e_send_cmd_pkt() instead.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:23:13 -07:00
Mateusz Kulikowski f4c807d6d5 staging: rtl8192e: Swap firmware endian in _rtl92e_fw_prepare()
Remove endian swap from  _rtl92e_fw_download_code(),
this way it can be replaced with _rtl92e_send_cmd_pkt().

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:23:13 -07:00
Mateusz Kulikowski 09b1893831 staging: rtl8192e: Add _rtl92e_fw_prepare
Add function to request and prepare firmware image.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:23:13 -07:00
Mateusz Kulikowski 51dac5f095 staging: rtl8192e: Add _rtl92e_wait_for_fw()
Add function waiting for firmware load/boot;
Remove _rtl92e_is_fw_ready() that is obsolete (can be replaced
with  _rtl92e_wait_for_fw().

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:23:13 -07:00
Mateusz Kulikowski 58533b2217 staging: rtl8192e: init_fw: Drop unneded check
rst_opt is always equal to OPT_SYSTEM_RESET in this scope.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:23:13 -07:00
Mateusz Kulikowski 6167a6c88c staging: rtl8192e: Rename rt_firmware::firmware_status to status
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:23:13 -07:00
Mateusz Kulikowski 292f4b47ba staging: rtl8192e: Add rt_fw_blob
rt_fw_blob contains single firmware blob and its size.
Update firmware loading code accordingly.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:23:13 -07:00
Mateusz Kulikowski c0f6479165 staging: rtl8192e: cmd_pkt: Handle INIT packets
Add support for DESC_PACKET_TYPE_INIT to rtl92e_send_cmd_pkt().
With this generalization, _rtl92e_fw_download_code() may be removed
after slight modification.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:23:13 -07:00
Mateusz Kulikowski 1e7da09afd staging: rtl8192e: Use macro to represent fragmentation threshold
Add CMDPACKET_FRAG_SIZE macro and use it as fragmentation threshold
in send_cmd_pkt functions.
This makes rt_firmware::cmdpacket_frag_thresold and
 rtl92e_init_fw_param() obsolete.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:23:13 -07:00
Mateusz Kulikowski c008fa83c4 staging: rtl8192e: cmdpkt: Pass data as const void*
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:23:13 -07:00
Mateusz Kulikowski d15fe3e019 staging: rtl8192e: cmdpkt: Reorder arguments
Use send_cmd_pkt(dev, type, data , size) order to avoid confusion

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:23:13 -07:00
Mateusz Kulikowski 2e74c73c98 staging: rtl8192e: cmdpkt: Simplify argument names
Rename:
codevirtualaddress -> data
buffer_len -> len
packettype -> type

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:23:13 -07:00
Mateusz Kulikowski 1afacec663 staging: rtl8192e: cmdpkt: Use packettype properly
rtl92e_send_cmd_pkt used hardcoded NORMAL packet type.

As it may be used to send other packet types as well - use
provided packet type instead of defaults.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:23:13 -07:00
Mateusz Kulikowski 62d46eaac6 staging: rtl8192e: rtl_dm: Use proper packet type
rtl92e_send_cmd_packet sends only NORMAL packets, passing
invalid type (even it it's ignored) is confusing.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:23:13 -07:00
Navya Sri Nizamkari ba57f5fadb Staging: emxx_udc: Add space around operator.
Add a space around '>>' operator.
Problem found using checkpatch.

Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
Reviewed-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:21:05 -07:00
Luis de Bethencourt 5a602ac4d6 staging: emxx_udc: Remove boolean comparisons
Boolean tests do not need explicit comparison to true or false.

Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:21:05 -07:00
Deepa Dinamani 6512edec48 staging: ft1000: remove obsolete driver
Remove support for Qleadtek Flash-OFDM modems. Telecom carrier is
discontinuing service for the radio technology.
See http://www.gtigroup.org/news/ind/2015-08-18/6996.html.

Suggested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:19:43 -07:00
H Hartley Sweeten eb96c7fc24 staging: comedi: adl_pci9118: tidy up pci9118_ai_setup_dma()
For aesthetics, init the dmalen[01] local variables when they are declared.

Use a local variable, 'scan_bytes', for the (devpriv->ai_n_realscanlen << 1)
calculation. For aesthetics and clarification, use comedi_bytes_per_sample()
instead of the '<< 1' shift to calculate the value.

The local variable 'i' is badly named. Remove it and use a local variable
'tmp' where it is used.

When checking the DMA buffer lengths for non-neverending commands the
scan length calculation, (devpriv->ai_n_realscanlen << 1) * cmd->stop_arg,
could overflow. Use and unsigned long long local variable to hold the
calculation and avoid the overflow.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:17:13 -07:00
H Hartley Sweeten 45037a9569 staging: comedi: adl_pci9118: rename interrupt_*() functions
For aesthetics, rename these functions so it they namespace associated
with the driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:17:13 -07:00
H Hartley Sweeten 5c912f1f28 staging: comedi: adl_pci9118: rename move_block_from_dma()
Rename this function so it has namespace associated with the driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:17:13 -07:00
H Hartley Sweeten 9459ff2b6b staging: comedi: adl_pci9118: rename valid_samples_in_act_dma_buf()
Rename this function so it has namespace associated with the driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:17:13 -07:00
H Hartley Sweeten ad1a9646b7 staging: comedi: adl_pci9118: rename interrupt_pci9118_ai_mode4_switch()
For aesthetics, remove "interrupt_" from this functions name to shorten
it a bit.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:17:13 -07:00
H Hartley Sweeten dd2907c3e7 staging: comedi: adl_pci9118: remove PCI9118_CHANLEN
This define is only used to initialize the analog input sudevice
'len_chanlist'. Remove the define and just open code the value.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:17:13 -07:00
H Hartley Sweeten 766957f6f1 staging: comedi: adl_pci9118: remove unused defines
These defines are not used in the driver. Remove them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:17:13 -07:00
H Hartley Sweeten 0f3cb85ac8 staging: comedi: adl_pci9118: tidy up check_channel_list()
Rename this function to give it namespace associated with the driver.

Currently this function is called by both the AI (*do_cmdtest) and the (*do_cmd)
functions. It really only needs to be called by the (*do_cmdtest) to validate
that the chanlist meets the requirements of the hardware. It's only called by
the (*do_cmd) to verify that the scan length is not to large after adding the
extra samples needed to satisfy the DMA.

Move the extra scan length check into the (*do_cmd) function and remove the
unnecessary parameters 'frontadd' and 'backadd'.

Tidy up the reset of the function.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:17:13 -07:00
H Hartley Sweeten 7c999314ef staging: comedi: adl_pci9118: remove unnecessary check in check_channel_list()
Step 3 of the AI (*do_cmdtest) validates that the cmd->chanlist_len is >= 1. If
it's not the (*do_cmdtest) fails and check_channel_list() is never called. This
This function is also called by the AI (*do_cmd) and the comedi core ensures
that the async command has a valid chanlist. Remove the unnecessary 'n_chan'
check.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:17:13 -07:00
H Hartley Sweeten 323538b825 staging: comedi: adl_pci9118: TRIG_INT is not vaild for scan_begin_src
The (*do_cmdtest) in this driver validated the scan_begin_src as being
TRIG_FOLLOW | TRIG_TIMER | TRIG_EXT. The TRIG_INT source is not valid.

Remove the Step 2 mutual compatibility check that makes sure that TRIG_INT
is only used for the start_src or the scan_begin_src.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:17:13 -07:00
Cristina Moraru 9aed06693d staging: comedi: Fix return flow
Simplify function return flow. Issue found
with coccinelle.

Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:16:20 -07:00
H Hartley Sweeten 64289a6506 staging: comedi: cb_pcidas: update MODULE_DESCRIPTION
Change the MODULE_DESCRIPTION to something more useful than the
generic "Comedi low-level driver".

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:15:22 -07:00
H Hartley Sweeten d52688055c staging: comedi: cb_pcidas: fix cb_pcidas_ao_nofifo_insn_write()
The comedi core expects (*insn_write) functions to write insn->n
data values to the hardware. Fix this function to work like the
core expects.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:15:22 -07:00
H Hartley Sweeten ef7e20934e staging: comedi: cb_pcidas: fix cb_pcidas_ao_fifo_insn_write()
The comedi core expects (*insn_write) functions to write insn->n
data values to the hardware. Fix this function to work like the
core expects.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:15:22 -07:00
H Hartley Sweeten f92738ca2f staging: comedi: cb_pcidas: remove superfluous comment
The ao (*cancel) function does not need commented.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:15:22 -07:00
H Hartley Sweeten 042bac563b staging: comedi: cb_pcidas: absorb cal_enable_bits()
This inline function just returns the bits needd to enable
a calibration source. For aethetics, absorb it into the callers.
Sorten the variable name in the private data used to hold the
current calibration source.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:15:22 -07:00
H Hartley Sweeten 46c95d970f staging: comedi: cb_pcidas: consolidate interrupt clear code
The analog output and analog input interrupts are currently cleared
as they are handled. Refactor the code to gather all the bits needed
to clear the interrupts and do it once at the end of the interrupt
handler.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:15:22 -07:00
H Hartley Sweeten 7d78346987 staging: comedi: cb_pcidas: split ai code out of interrupt handler
Clarify the interrupt handler by splitting the analog input handling
into a new function.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:15:22 -07:00
Geliang Tang abfe2196e0 staging: comedi: make ni_tio_has_gate2_registers return boolean
This patch makes ni_tio_has_gate2_registers return boolean, since
this function only uses either one or zero as its return value.

Signed-off-by: Geliang Tang <geliangtang@163.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:14:25 -07:00
Ksenija Stanojevic c1ccdddc2e Staging: rtl8192e: Use module_pci_driver
Use module_pci_driver for drivers whose init and exit functions only
register and unregister, respectively.

Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:12:48 -07:00
Larry Finger 1e6e632836 staging: rtl8712: Add device ID for Sitecom WLA2100
This adds the USB ID for the Sitecom WLA2100. The Windows 10 inf file
was checked to verify that the addition is correct.

Reported-by: Frans van de Wiel <fvdw@fvdw.eu>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Frans van de Wiel <fvdw@fvdw.eu>
Cc: Stable <stable@vger.kernel.org> [All stable versions]
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:12:48 -07:00
Navya Sri Nizamkari c3a56f750d Staging: xgifb: Remove space after cast
This patch fixes the checkpatch check:

CHECK: No space is necessary after a cast

Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:11:30 -07:00
Navya Sri Nizamkari 076e235856 Staging: xgifb: Fix comparison to NULL warning
Change comparison to NULL to a ! operation.
Found using checkpatch.

Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:11:30 -07:00
Navya Sri Nizamkari 0d46afbce6 Staging: xgifb: Remove extra blank lines.
This patch fixes the checkpatch.pl check:

CHECK: Please don't use multiple blank lines

Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:11:30 -07:00
Navya Sri Nizamkari 3fc27711de Staging: xgifb: Remove blank line before } and after {
Remove blank line after { and before }.
Problem found using checkpatch.

Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:11:30 -07:00
Navya Sri Nizamkari d8acac9421 Staging: xgifb: Replace udelay, mdelay functions with usleep_range
This patch fixes the checkpatch.pl check:

CHECK: usleep_range is preferred over udelay.

Replace mdelay with usleep_range function too.
Add 1 millisecond to the delay time to get a
reasonable upper limit which saves one wakeup call.
Do same throughout the file.

Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:11:30 -07:00