mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-26 22:24:09 +08:00
staging: fbtft: Removes one nesting level to help readability - Style
This nesting level was removed to improve readability. Signed-off-by: Leonardo Brás <leobras.c@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
d9932c8be0
commit
5bfac06f3e
@ -679,19 +679,22 @@ static int flexfb_probe_common(struct spi_device *sdev,
|
|||||||
if (par->spi->master->bits_per_word_mask
|
if (par->spi->master->bits_per_word_mask
|
||||||
& SPI_BPW_MASK(9)) {
|
& SPI_BPW_MASK(9)) {
|
||||||
par->spi->bits_per_word = 9;
|
par->spi->bits_per_word = 9;
|
||||||
} else {
|
break;
|
||||||
dev_warn(dev,
|
|
||||||
"9-bit SPI not available, emulating using 8-bit.\n");
|
|
||||||
/* allocate buffer with room for dc bits */
|
|
||||||
par->extra = devm_kzalloc(par->info->device,
|
|
||||||
par->txbuf.len + (par->txbuf.len / 8) + 8,
|
|
||||||
GFP_KERNEL);
|
|
||||||
if (!par->extra) {
|
|
||||||
ret = -ENOMEM;
|
|
||||||
goto out_release;
|
|
||||||
}
|
|
||||||
par->fbtftops.write = fbtft_write_spi_emulate_9;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dev_warn(dev,
|
||||||
|
"9-bit SPI not available, emulating using 8-bit.\n");
|
||||||
|
/* allocate buffer with room for dc bits */
|
||||||
|
par->extra = devm_kzalloc(par->info->device,
|
||||||
|
par->txbuf.len
|
||||||
|
+ (par->txbuf.len / 8) + 8,
|
||||||
|
GFP_KERNEL);
|
||||||
|
if (!par->extra) {
|
||||||
|
ret = -ENOMEM;
|
||||||
|
goto out_release;
|
||||||
|
}
|
||||||
|
par->fbtftops.write = fbtft_write_spi_emulate_9;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
dev_err(dev,
|
dev_err(dev,
|
||||||
|
Loading…
Reference in New Issue
Block a user