aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/pi433 (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-01-10staging: pi433: Cleanup codestyle, indent statements after case labelsMichael Panzlaff1-79/+158
This patch changes the indentation of the statements after case labels. The linux coding guidelines do not explicitly mentiond this but pretty much all existing code doesn't put any statements into the same line of their belonging case labels. Therefore this adapts to the more usual style. Please note that there is still a lot of > 80 character lines which will cause checkpatch warnings. This patch does not intent to fix this already existing issue. Signed-off-by: Michael Panzlaff <michael.panzlaff@fau.de> Signed-off-by: Tillmann Zipperer <tillmann.zipperer@fau.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-09staging: pi433: align function parameters with open parenthesisValentin Vidic1-5/+5
Fixes checkpatch warnings: CHECK: Alignment should match open parenthesis Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-09staging: pi433: replace shifting with BIT macroValentin Vidic1-1/+1
Fixes checkpatch warnings: CHECK: Prefer using the BIT macro Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-08Staging: pi433 - fix ccheckpatch issue, updated include line.Derek Robson1-1/+1
Updated the include of compat.h to fix checkpatch error Signed-off-by: Derek Robson <robsonde@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-08staging: pi433: fix CamelCase for payload identifiersValentin Vidic4-6/+6
Fixes checkpatch warnings: CHECK: Avoid CamelCase: <payloadLength> CHECK: Avoid CamelCase: <payloadReady> Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-08staging: pi433: fix CamelCase for maxMinus variablesValentin Vidic3-17/+17
Fixes checkpatch warnings: CHECK: Avoid CamelCase: <maxMinus12> CHECK: Avoid CamelCase: <maxMinus24> CHECK: Avoid CamelCase: <maxMinus36> CHECK: Avoid CamelCase: <maxMinus48> CHECK: Avoid CamelCase: <maxMinus6> Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-08staging: pi433: remove unused rf69_reset_flag functionMarcin Ciupak2-13/+0
Function rf69_reset_flag is unused and should be removed. Signed-off-by: Marcin Ciupak <marcin.s.ciupak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-08staging: pi433: remove unused rf69_set_sync_tolerance functionMarcin Ciupak2-13/+0
Function rf69_set_sync_tolerance is unused and should be removed. Signed-off-by: Marcin Ciupak <marcin.s.ciupak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-21staging: pi433: remove unused rf69_set_dc_cut_off_frequency* functionsMarcin Ciupak3-41/+0
The following functions: * rf69_set_dc_cut_off_frequency, * rf69_set_dc_cut_off_frequency_intern, * rf69_set_dc_cut_off_frequency_during_afc are unused and should be removed along with type enum dcc_percent which was used only by these functions. Signed-off-by: Marcin Ciupak <marcin.s.ciupak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-21staging: pi433: remove unused rf69_set_ook_threshold_type functionMarcin Ciupak3-19/+0
Function rf69_set_ook_threshold_type is unused and should be removed along with type enum thresholdType which was used only by that function. Signed-off-by: Marcin Ciupak <marcin.s.ciupak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-21staging: pi433: remove unused rf69_set_ook_threshold_step functionMarcin Ciupak3-29/+0
Function rf69_set_ook_threshold_step is unused and should be removed along with type enum thresholdStep which was used only by that function. Signed-off-by: Marcin Ciupak <marcin.s.ciupak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-21staging: pi433: remove unused rf69_set_rx_start_timeout functionMarcin Ciupak2-8/+0
Function rf69_set_rx_start_timeout is unused and should be removed. Signed-off-by: Marcin Ciupak <marcin.s.ciupak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-21staging: pi433: remove unused rf69_set_rssi_timeout functionMarcin Ciupak2-8/+0
Function rf69_set_rssi_timeout is unused and should be removed. Signed-off-by: Marcin Ciupak <marcin.s.ciupak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-21staging: pi433: remove unused rf69_get_payload_length functionMarcin Ciupak2-6/+0
Function rf69_get_payload_length is unused and should be removed. Signed-off-by: Marcin Ciupak <marcin.s.ciupak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-21staging: pi433: make local functions staticMarcin Ciupak2-50/+47
Following functions: * rf69_get_modulation * rf69_read_reg * rf69_write_reg are used locally only and should be declared as static Signed-off-by: Marcin Ciupak <marcin.s.ciupak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-21staging: pi433: fix CamelCase for fifo variablesValentin Vidic4-34/+34
Fixes checkpatch warnings: CHECK: Avoid CamelCase: <fifoEmpty> CHECK: Avoid CamelCase: <fifoFillCondition> CHECK: Avoid CamelCase: <fifoFull> CHECK: Avoid CamelCase: <fifoLevel> CHECK: Avoid CamelCase: <fifoLevelBelowThreshold> CHECK: Avoid CamelCase: <fifoNotEmpty> CHECK: Avoid CamelCase: <fifoOverrun> Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-21staging: pi433: pi433_write fixed the return valueOliver Graute1-1/+1
The pi433_write function should return the number of processed bytes Reported-by: Marcin Ciupak <marcin.s.ciupak@gmail.com> Signed-off-by: Oliver Graute <oliver.graute@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-19staging: pi433: remove unused functionValentin Vidic2-19/+0
As it turns out rf69_get_lna_gain is not used at all. Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-19staging: pi433: replace printk calls with dev_dbgValentin Vidic1-2/+2
Fixes checkpatch warning: WARNING: printk() should include KERN_<LEVEL> facility level Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-19staging: pi433: avoid logging ENOMEM messagesValentin Vidic1-3/+1
Fixes checkpatch warning: WARNING: Possible unnecessary 'out of memory' message Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-19staging: pi433: replace unsigned with unsigned intValentin Vidic1-1/+1
Fixes checkpatch warning: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-19staging: pi433: collapse else block after return statementValentin Vidic1-7/+7
Fixes checkpatch warning: WARNING: else is not generally useful after a break or return Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-19Staging: Pi433: Bugfix for wrong argument for sizeof() in TX threadMarcus Wolf1-7/+6
sizeof(array) != sizeof(pointer to array) Fixes: "staging: pi433: reduce stack size in tx thread" Fixes: 62f39d49d168 ("staging: pi433: reduce stack size in tx thread") Signed-off-by: Marcus Wolf <linux@wolf-entwicklungen.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-19staging: pi433: remove multiple blank linesValentin Vidic4-25/+0
Fixes checkpatch warning for multiple blank lines in source. Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-19staging: pi433: fix CamelCase for dccPercent variablesValentin Vidic3-27/+27
Fixes checkpatch warning: CHECK: Avoid CamelCase: <dccPercent> Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-18Merge 4.15-rc4 into staging-nextGreg Kroah-Hartman1-1/+1
We want the staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-13staging: pi433: Fix disordered switch caseKari Argillander1-2/+2
Case: SHAPING_0_5 is writing DATAMODUL_MODLATION_SHAPE_0_3 value and vice versa Signed-off-by: Kari Argillander <kari.argillander@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-13staging: pi433: remove comparison with trueValentin Vidic1-1/+1
Fixes checkpatch warning for error prone comparison. Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-13staging: pi433: remove comparison with falseValentin Vidic1-1/+1
Fixes checkpatch warning for error prone comparison. Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-13staging: pi433: add blank line after functionValentin Vidic1-0/+1
Fixes checkpatch warning for blank line after function/struct/union/enum declarations. Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-13staging: pi433: fix spelling errors in documentationValentin Vidic1-2/+2
Fixes checkpatch warning for 'transfered' and 'devided'. Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-13staging: pi433: rewrite comparison with NULLValentin Vidic1-2/+2
Fixes checkpatch warning for comparing value with NULL. Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-13staging: pi433: remove return from a void functionValentin Vidic1-1/+0
Fixes checkpatch warning for void function return statements. Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-13staging: pi433: remove spaces before tabsValentin Vidic3-4/+4
Fixes checkpatch warning for hidden spaces before tabs. Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-13staging: pi433: move trailing statements to next lineValentin Vidic1-14/+31
Fixes checkpatch error for trailing if statements. Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-13staging: pi433: use tabs for code indentValentin Vidic2-20/+20
Fixes checkpatch error for whitespace idents. Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-13staging: pi433: use consistent brace styleValentin Vidic1-88/+41
Fixes checkpatch error for open/close braces. Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-13staging: pi433: remove space inside parenthesisValentin Vidic3-21/+21
Fixes checkpatch error for prohibited spaces. Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-13staging: pi433: add space around operatorsValentin Vidic1-5/+4
Fixes checkpatch error for missing spaces. Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-13staging: pi433: add space after commaValentin Vidic1-2/+2
Fixes checkpatch error for missing spaces. Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-13staging: pi433: add space before open parenthesisValentin Vidic1-2/+2
Fixes checkpatch error for missing spaces. Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-13staging: pi433: Remove unnecessary #ifdef DEBUG around dev_dbgSimon Sandström1-4/+0
dev_dbg() already depends on DEBUG. Signed-off-by: Simon Sandström <simon@nikanor.nu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-13staging: pi433: Remove function entry dev_dbg()Simon Sandström1-156/+0
ftrace can be used to trace function calls, so there is no need to use dev_dbg() here. Signed-off-by: Simon Sandström <simon@nikanor.nu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-13staging: pi433: Remove indentation on #ifdef blocksSimon Sandström1-161/+153
ifdef blocks should not increase indentation level. Signed-off-by: Simon Sandström <simon@nikanor.nu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-08staging: pi433: Fix validation of rf69_get_modulation valueMarcin Ciupak1-2/+6
Checking of modulation in rf69_set_modulation_shaping is done by if-else and since else part covers OOK and UNDEF values it possible to set modulation shaping for undefined modulation type. To fix this validation should be done by switch clause and in case of undefined modulation error returned. Signed-off-by: Marcin Ciupak <marcin.s.ciupak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-08staging: pi433: Fix missing 'undefined' value in enum modulationMarcin Ciupak2-2/+3
It is possible that rf69_get_modulation() function will return 'undefined' value and this value is missing in enum modulation. Fix this by adding appropriate entry in enum modulation. Signed-off-by: Marcin Ciupak <marcin.s.ciupak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-08staging: pi433: Add spaces around & and + operatorSimon Sandström1-15/+14
Fixes checkpatch warning: "spaces preferred around that '&'". Signed-off-by: Simon Sandström <simon@nikanor.nu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-08staging: pi433: Fix ISO-8859 encoded non-english commentsSimon Sandström1-5/+6
Some comments, like "without memcpy would be nice", are removed. Other comments are just translated to english. rf69.c is now plain ASCII. Signed-off-by: Simon Sandström <simon@nikanor.nu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-08staging: pi433: pi433_if.c remove SET_CHECKED macroNguyen Phan Quang Minh1-54/+139
The macro calls its argument -a function- twice, makes the calling function return prematurely -skipping resource cleanup code- and hurts understandability. Signed-off-by: Nguyen Phan Quang Minh <minhnpq16@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-06staging: pi433: Remove SET_CHECKED usage from pi433_probeSimon Sandström1-7/+21
SET_CHECKED returns from the function on failure and in pi433_probe it is necessary to free the GPIOs and the device on failure. Signed-off-by: Simon Sandström <simon@nikanor.nu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>