summaryrefslogtreecommitdiffstats
path: root/drivers/staging/pi433/pi433_if.c
Commit message (Collapse)AuthorAgeFilesLines
* staging: pi433: Replace printk() with dev_dbg()Haneen Mohammed2017-09-171-4/+5
| | | | | | | | | This patch convert printk() to the preferred variant dev_dbg() and remove unnecessary comment line. Issue detected with checkpatch.pl. Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: pi433: Fixes minor typo errorsHarsha Sharma2017-09-171-2/+2
| | | | | | | Fixes checkpatch warning -- "occured" and "succesfully" are misspelled Signed-off-by: Harsha Sharma <harshasharmaiitr@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: pi433: fix interrupt handler signaturesCihangir Akturk2017-08-281-11/+8
| | | | | | | | | | | | Remove "struct pt_regs *" parameter from interrupt handlers, since it is no longer passed to interrupt handlers. Also, convert return types to irqreturn_t. Additionally, move DIO_irq_handler variable into the setup_GPIO function, as it's not used outside of this function. Signed-off-by: Cihangir Akturk <cakturk@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: pi433: fixed coding style issuesXiangyang Zhang2017-08-201-8/+7
| | | | | | | | space required before the open parenthesis, open brace should be on previous line. Signed-off-by: Xiangyang Zhang <xyz.sun.ok@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: pi433: reduce stack size in tx threadArnd Bergmann2017-08-141-1/+2
| | | | | | | | | | | | | | | Putting a 900 byte array on the stack is a clearly too much in the kernel, and sometimes results in warnings like: drivers/staging/pi433/pi433_if.c: In function 'pi433_tx_thread': drivers/staging/pi433/pi433_if.c:645:1: error: the frame size of 1028 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] This moves the buffer into the dynamically allocated per-device structure. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Marcus Wolf <linux@wolf-entwicklungen.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: pi433: Use matching enum types calling rf69_set_packet_formatElia Geretto2017-08-141-2/+21
| | | | | | | | | | | | | | | | | | | | | | | This patch fixes the following four warnings found using sparse: drivers/staging/pi433/pi433_if.c:211:9: warning: mixing different enum types drivers/staging/pi433/pi433_if.c:211:9: int enum optionOnOff versus drivers/staging/pi433/pi433_if.c:211:9: int enum packetFormat drivers/staging/pi433/pi433_if.c:211:9: warning: mixing different enum types drivers/staging/pi433/pi433_if.c:211:9: int enum optionOnOff versus drivers/staging/pi433/pi433_if.c:211:9: int enum packetFormat drivers/staging/pi433/pi433_if.c:268:9: warning: mixing different enum types drivers/staging/pi433/pi433_if.c:268:9: int enum optionOnOff versus drivers/staging/pi433/pi433_if.c:268:9: int enum packetFormat drivers/staging/pi433/pi433_if.c:268:9: warning: mixing different enum types drivers/staging/pi433/pi433_if.c:268:9: int enum optionOnOff versus drivers/staging/pi433/pi433_if.c:268:9: int enum packetFormat This is done calling the rf69_set_packet_format function using the appropriate enum for the packetFormat argument. Signed-off-by: Elia Geretto <elia.f.geretto@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: pi433: Style fix - align block commentsDerek Robson2017-07-281-15/+23
| | | | | | | | | Fixed the alignment of block comments Found using checkpatch Signed-off-by: Derek Robson <robsonde@gmail.com> Reviewed-by: Marcus Wolf <linux@wolf-entwicklungen.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: pi433: check error after kthread_run()Joseph Wright2017-07-281-1/+1
| | | | | | | | | | | | | | | | Error should be checked with IS_ERR after calling kthread_run() instead of comparing the returned pointer to an int. Found by sparse warning: incompatible types for operation (<) left side has type struct task_struct *tx_task_struct right side has type int Signed-off-by: Joseph Wright <rjosephwright@gmail.com> Reviewed-by: Marcus Wolf <linux@wolf-entwicklungen.de> Tested-by: Marcus Wolf <linux@wolf-entwicklungen.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: pi433: declare functions staticJoseph Wright2017-07-281-2/+2
| | | | | | | | | | | Declare functions static to fix sparse warnings: warning: symbol 'pi433_receive' was not declared. Should it be static? warning: symbol 'pi433_tx_thread' was not declared. Should it be static? Signed-off-by: Joseph Wright <rjosephwright@gmail.com> Reviewed-by: Marcus Wolf <linux@wolf-entwicklungen.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: pi433: return -EFAULT if copy_to_user() failsdan.carpenter@oracle.com2017-07-281-1/+1
| | | | | | | | | copy_to_user() to user returns the number of bytes that weren't copied, but we should be returning -EFAULT to the user. Fixes: 874bcba65f9a ("staging: pi433: New driver") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: pi433: Fix a couple of spelling mistakesColin Ian King2017-07-181-2/+2
| | | | | | | | | | Trivial fix to spelling mistakes in dev_dbg debug messages "wiat" -> "wait" "fonud" -> "found" Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: pi433: New driverMarcus Wolf2017-07-161-0/+1314
Added a driver for the pi433 radio module (see https://www.pi433.de/en.html for details). Signed-off-by: Marcus Wolf <linux@Wolf-Entwicklungen.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
OpenPOWER on IntegriCloud