Lines have been split where it makes sense to shorten them in order to comply with the coding standards and fix checkpatch.pl warnings. There are still lines left that are too long, however breaking those would impair readability. Signed-off-by: Sophie Matter <sophie.matter@xxxxxx> Signed-off-by: Rico Schrage <rico.schrage@xxxxxxxxx> --- drivers/staging/pi433/pi433_if.c | 18 ++++++++++++------ drivers/staging/pi433/pi433_if.h | 6 ++++-- drivers/staging/pi433/rf69.c | 10 +++++++--- 3 files changed, 23 insertions(+), 11 deletions(-) diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c index e2b8a518dafe..a58c535c6638 100644 --- a/drivers/staging/pi433/pi433_if.c +++ b/drivers/staging/pi433/pi433_if.c @@ -55,10 +55,10 @@ #include "pi433_if.h" #include "rf69.h" -#define N_PI433_MINORS BIT(MINORBITS) /*32*/ /* ... up to 256 */ -#define MAX_MSG_SIZE 900 /* min: FIFO_SIZE! */ -#define MSG_FIFO_SIZE 65536 /* 65536 = 2^16 */ -#define NUM_DIO 2 +#define N_PI433_MINORS BIT(MINORBITS) /*32*/ /* ... up to 256 */ +#define MAX_MSG_SIZE 900 /* min: FIFO_SIZE! */ +#define MSG_FIFO_SIZE 65536 /* 65536 = 2^16 */ +#define NUM_DIO 2 static dev_t pi433_dev; static DEFINE_IDR(pi433_idr); @@ -827,7 +827,10 @@ pi433_write(struct file *filp, const char __user *buf, instance = filp->private_data; device = instance->device; - /* check, whether internal buffer (tx thread) is big enough for requested size */ + /* + * check whether internal buffer (tx thread) is big enough + * for requested size + */ if (count > MAX_MSG_SIZE) return -EMSGSIZE; @@ -1139,7 +1142,10 @@ static int pi433_probe(struct spi_device *spi) /* setup spi parameters */ spi->mode = 0x00; spi->bits_per_word = 8; - /* spi->max_speed_hz = 10000000; 1MHz already set by device tree overlay */ + /* + * spi->max_speed_hz = 10000000; + * 1MHz already set by device tree overlay + */ retval = spi_setup(spi); if (retval) { diff --git a/drivers/staging/pi433/pi433_if.h b/drivers/staging/pi433/pi433_if.h index c082bfcbae57..c27be8400e99 100644 --- a/drivers/staging/pi433/pi433_if.h +++ b/drivers/staging/pi433/pi433_if.h @@ -43,7 +43,8 @@ enum option_on_off { /* IOCTL structs and commands */ /** - * struct pi433_tx_config - describes the configuration of the radio module for sending + * struct pi433_tx_config + * describes the configuration of the radio module for sending * @frequency: * @bit_rate: * @modulation: @@ -90,7 +91,8 @@ struct pi433_tx_cfg { }; /** - * struct pi433_rx_config - describes the configuration of the radio module for sending + * struct pi433_rx_config + * describes the configuration of the radio module for sending * @frequency: * @bit_rate: * @modulation: diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c index e4a1e64c868a..aac8143a991e 100644 --- a/drivers/staging/pi433/rf69.c +++ b/drivers/staging/pi433/rf69.c @@ -133,9 +133,13 @@ int rf69_set_mode(struct spi_device *spi, enum mode mode) return -EINVAL; } - // we are using packet mode, so this check is not really needed - // but waiting for mode ready is necessary when going from sleep because the FIFO may not be immediately available from previous mode - //while (_mode == RF69_MODE_SLEEP && (READ_REG(REG_IRQFLAGS1) & RF_IRQFLAGS1_MODEREADY) == 0x00); // Wait for ModeReady + /* + * we are using packet mode, so this check is not really needed + * but waiting for mode ready is necessary when going from sleep + * because the FIFO may not be immediately available from previous mode + * while (_mode == RF69_MODE_SLEEP && (READ_REG(REG_IRQFLAGS1) & + * RF_IRQFLAGS1_MODEREADY) == 0x00); // Wait for ModeReady + */ } int rf69_set_data_mode(struct spi_device *spi, u8 data_mode) -- 2.18.0 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel