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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Drop ugly label as no resource cleanup is needed.
Signed-off-by: Mateusz Kulikowski <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Remove endian swap from _rtl92e_fw_download_code(),
this way it can be replaced with _rtl92e_send_cmd_pkt().
Signed-off-by: Mateusz Kulikowski <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
rst_opt is always equal to OPT_SYSTEM_RESET in this scope.
Signed-off-by: Mateusz Kulikowski <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Use send_cmd_pkt(dev, type, data , size) order to avoid confusion
Signed-off-by: Mateusz Kulikowski <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
rtl92e_send_cmd_packet sends only NORMAL packets, passing
invalid type (even it it's ignored) is confusing.
Signed-off-by: Mateusz Kulikowski <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Add a space around '>>' operator.
Problem found using checkpatch.
Signed-off-by: Navya Sri Nizamkari <[email protected]>
Reviewed-by: Julia Lawall <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Boolean tests do not need explicit comparison to true or false.
Signed-off-by: Luis de Bethencourt <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
For aesthetics, rename these functions so it they namespace associated
with the driver.
Signed-off-by: H Hartley Sweeten <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Rename this function so it has namespace associated with the driver.
Signed-off-by: H Hartley Sweeten <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Rename this function so it has namespace associated with the driver.
Signed-off-by: H Hartley Sweeten <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
For aesthetics, remove "interrupt_" from this functions name to shorten
it a bit.
Signed-off-by: H Hartley Sweeten <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
These defines are not used in the driver. Remove them.
Signed-off-by: H Hartley Sweeten <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Change the MODULE_DESCRIPTION to something more useful than the
generic "Comedi low-level driver".
Signed-off-by: H Hartley Sweeten <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Clarify the interrupt handler by splitting the analog input handling
into a new function.
Signed-off-by: H Hartley Sweeten <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Use module_pci_driver for drivers whose init and exit functions only
register and unregister, respectively.
Signed-off-by: Ksenija Stanojevic <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]>
Signed-off-by: Larry Finger <[email protected]>
Cc: Frans van de Wiel <[email protected]>
Cc: Stable <[email protected]> [All stable versions]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch fixes the checkpatch check:
CHECK: No space is necessary after a cast
Signed-off-by: Navya Sri Nizamkari <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Change comparison to NULL to a ! operation.
Found using checkpatch.
Signed-off-by: Navya Sri Nizamkari <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Remove blank line after { and before }.
Problem found using checkpatch.
Signed-off-by: Navya Sri Nizamkari <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch makes XGIfb_has_VB return boolean, since this function
only uses either one or zero as its return value.
Signed-off-by: Geliang Tang <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Use the timer API function setup_timer instead of init_timer, removing
the structure field assignments.
<smpl>
@timer@
expression e1,e2,e3,fn_ptr;
@@
-init_timer(&e1);
+setup_timer(&e1, fn_ptr, e2);
... when != fn_ptr = e3
-e1.function = fn_ptr;
-e1.data = e2;
</smpl>
Signed-off-by: Muhammad Falak R Wani <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>