aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/pi433
diff options
context:
space:
mode:
authorSophie Matter <sophie.matter@web.de>2018-07-11 11:45:52 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-07-11 13:12:34 +0200
commit368928160477d7315a2b06cf640e34374aa36fcb (patch)
treea61d6528fd8d18e76bf7dc66bb00fa968f247c61 /drivers/staging/pi433
parent63688e61d5629c3b931562315bd0373335269880 (diff)
staging: pi433: Use preferred commenting style
For multi-line comments, the preferred commenting style from the coding style Documentation was applied to the comments, meaning almost blank lines at the beginning and end of the comment. One changed comment includes a line over 80 characters, causing checkpatch.pl to complain, however breaking this line would not make much sense, so it is kept like it is. Signed-off-by: Sophie Matter <sophie.matter@web.de> Signed-off-by: Rico Schrage <rico.schrage@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/pi433')
-rw-r--r--drivers/staging/pi433/pi433_if.c30
-rw-r--r--drivers/staging/pi433/rf69.c15
2 files changed, 30 insertions, 15 deletions
diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c
index cced28afe454..511b2b531732 100644
--- a/drivers/staging/pi433/pi433_if.c
+++ b/drivers/staging/pi433/pi433_if.c
@@ -66,10 +66,12 @@ static DEFINE_MUTEX(minor_lock); /* Protect idr accesses */
static struct class *pi433_class; /* mainly for udev to create /dev/pi433 */
-/* tx config is instance specific
+/*
+ * tx config is instance specific
* so with each open a new tx config struct is needed
*/
-/* rx config is device specific
+/*
+ * rx config is device specific
* so we have just one rx config, ebedded in device struct
*/
struct pi433_device {
@@ -584,7 +586,8 @@ pi433_tx_thread(void *data)
if (kthread_should_stop())
return 0;
- /* get data from fifo in the following order:
+ /*
+ * get data from fifo in the following order:
* - tx_cfg
* - size of message
* - message
@@ -639,7 +642,8 @@ pi433_tx_thread(void *data)
dev_dbg(device->dev,
"read %d message byte(s) from fifo queue.", retval);
- /* if rx is active, we need to interrupt the waiting for
+ /*
+ * if rx is active, we need to interrupt the waiting for
* incoming telegrams, to be able to send something.
* We are only allowed, if currently no reception takes
* place otherwise we need to wait for the incoming telegram
@@ -649,14 +653,16 @@ pi433_tx_thread(void *data)
!device->rx_active ||
device->interrupt_rx_allowed);
- /* prevent race conditions
+ /*
+ * prevent race conditions
* irq will be reenabled after tx config is set
*/
disable_irq(device->irq_num[DIO0]);
device->tx_active = true;
if (device->rx_active && !rx_interrupted) {
- /* rx is currently waiting for a telegram;
+ /*
+ * rx is currently waiting for a telegram;
* we need to set the radio module to standby
*/
retval = rf69_set_mode(device->spi, standby);
@@ -1097,7 +1103,8 @@ static void pi433_free_minor(struct pi433_device *dev)
static const struct file_operations pi433_fops = {
.owner = THIS_MODULE,
- /* REVISIT switch to aio primitives, so that userspace
+ /*
+ * REVISIT switch to aio primitives, so that userspace
* gets more complete API coverage. It'll simplify things
* too, except for the locking.
*/
@@ -1316,7 +1323,8 @@ static struct spi_driver pi433_spi_driver = {
.probe = pi433_probe,
.remove = pi433_remove,
- /* NOTE: suspend/resume methods are not necessary here.
+ /*
+ * NOTE: suspend/resume methods are not necessary here.
* We don't do anything except pass the requests to/from
* the underlying controller. The refrigerator handles
* most issues; the controller driver handles the rest.
@@ -1329,13 +1337,15 @@ static int __init pi433_init(void)
{
int status;
- /* If MAX_MSG_SIZE is smaller then FIFO_SIZE, the driver won't
+ /*
+ * If MAX_MSG_SIZE is smaller then FIFO_SIZE, the driver won't
* work stable - risk of buffer overflow
*/
if (MAX_MSG_SIZE < FIFO_SIZE)
return -EINVAL;
- /* Claim device numbers. Then register a class
+ /*
+ * Claim device numbers. Then register a class
* that will key udev/mdev to add/remove /dev nodes. Last, register
* Last, register the driver which manages those device numbers.
*/
diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c
index 77e0a677ea96..2dcda814fce0 100644
--- a/drivers/staging/pi433/rf69.c
+++ b/drivers/staging/pi433/rf69.c
@@ -42,7 +42,8 @@ static u8 rf69_read_reg(struct spi_device *spi, u8 addr)
#ifdef DEBUG_VALUES
if (retval < 0)
- /* should never happen, since we already checked,
+ /*
+ * should never happen, since we already checked,
* that module is connected. Therefore no error
* handling, just an optional error message...
*/
@@ -66,7 +67,8 @@ static int rf69_write_reg(struct spi_device *spi, u8 addr, u8 value)
#ifdef DEBUG_VALUES
if (retval < 0)
- /* should never happen, since we already checked,
+ /*
+ * should never happen, since we already checked,
* that module is connected. Therefore no error
* handling, just an optional error message...
*/
@@ -576,8 +578,10 @@ bool rf69_get_flag(struct spi_device *spi, enum flag flag)
return (rf69_read_reg(spi, REG_IRQFLAGS1) & MASK_IRQFLAGS1_SYNC_ADDRESS_MATCH);
case fifo_full:
return (rf69_read_reg(spi, REG_IRQFLAGS2) & MASK_IRQFLAGS2_FIFO_FULL);
-/* case fifo_not_empty:
- * return (rf69_read_reg(spi, REG_IRQFLAGS2) & MASK_IRQFLAGS2_FIFO_NOT_EMPTY); */
+/*
+ * case fifo_not_empty:
+ * return (rf69_read_reg(spi, REG_IRQFLAGS2) & MASK_IRQFLAGS2_FIFO_NOT_EMPTY);
+ */
case fifo_empty:
return !(rf69_read_reg(spi, REG_IRQFLAGS2) & MASK_IRQFLAGS2_FIFO_NOT_EMPTY);
case fifo_level_below_threshold:
@@ -773,7 +777,8 @@ int rf69_set_fifo_threshold(struct spi_device *spi, u8 threshold)
if (retval)
return retval;
- /* access the fifo to activate new threshold
+ /*
+ * access the fifo to activate new threshold
* retval (mis-) used as buffer here
*/
return rf69_read_fifo(spi, (u8 *)&retval, 1);