mirror of https://gitee.com/openkylin/linux.git
staging: pi433: add space around operators
Fixes checkpatch error for missing spaces. Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
dd30cfebb8
commit
e27de55d0e
|
@ -638,14 +638,14 @@ pi433_tx_thread(void *data)
|
||||||
|
|
||||||
/* add length byte, if requested */
|
/* add length byte, if requested */
|
||||||
if (tx_cfg.enable_length_byte == OPTION_ON)
|
if (tx_cfg.enable_length_byte == OPTION_ON)
|
||||||
buffer[position++] = size-1; /* according to spec length byte itself must be excluded from the length calculation */
|
buffer[position++] = size - 1; /* according to spec length byte itself must be excluded from the length calculation */
|
||||||
|
|
||||||
/* add adr byte, if requested */
|
/* add adr byte, if requested */
|
||||||
if (tx_cfg.enable_address_byte == OPTION_ON)
|
if (tx_cfg.enable_address_byte == OPTION_ON)
|
||||||
buffer[position++] = tx_cfg.address_byte;
|
buffer[position++] = tx_cfg.address_byte;
|
||||||
|
|
||||||
/* finally get message data from fifo */
|
/* finally get message data from fifo */
|
||||||
retval = kfifo_out(&device->tx_fifo, &buffer[position], sizeof(buffer)-position );
|
retval = kfifo_out(&device->tx_fifo, &buffer[position], sizeof(buffer) - position);
|
||||||
dev_dbg(device->dev, "read %d message byte(s) from fifo queue.", retval);
|
dev_dbg(device->dev, "read %d message byte(s) from fifo queue.", retval);
|
||||||
mutex_unlock(&device->tx_fifo_lock);
|
mutex_unlock(&device->tx_fifo_lock);
|
||||||
|
|
||||||
|
@ -734,7 +734,7 @@ pi433_tx_thread(void *data)
|
||||||
rf69_write_fifo(spi,
|
rf69_write_fifo(spi,
|
||||||
&buffer[position],
|
&buffer[position],
|
||||||
temp);
|
temp);
|
||||||
position +=temp;
|
position += temp;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ /* msg fits into fifo - take all */
|
{ /* msg fits into fifo - take all */
|
||||||
|
@ -1030,8 +1030,7 @@ static int setup_GPIOs(struct pi433_device *device)
|
||||||
DIO1_irq_handler
|
DIO1_irq_handler
|
||||||
};
|
};
|
||||||
|
|
||||||
for (i=0; i<NUM_DIO; i++)
|
for (i = 0; i < NUM_DIO; i++) {
|
||||||
{
|
|
||||||
/* "construct" name and get the gpio descriptor */
|
/* "construct" name and get the gpio descriptor */
|
||||||
snprintf(name, sizeof(name), "DIO%d", i);
|
snprintf(name, sizeof(name), "DIO%d", i);
|
||||||
device->gpiod[i] = gpiod_get(&device->spi->dev, name, 0 /*GPIOD_IN*/);
|
device->gpiod[i] = gpiod_get(&device->spi->dev, name, 0 /*GPIOD_IN*/);
|
||||||
|
|
Loading…
Reference in New Issue