staging: fbtft: ternary statement to if statement.

Convert a ternary statement into a if statement which is detected while
resolving "WARNING: line over 80 characters". Use BIT() macro instead
manually left shifting.

Signed-off-by: Bhagyashri Dighole <digholebhagyashri@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Bhagyashri Dighole 2019-03-19 16:30:37 +05:30 committed by Greg Kroah-Hartman
parent 7945e27826
commit e54c2b0aef
1 changed files with 2 additions and 1 deletions

View File

@ -184,7 +184,8 @@ static int write_vmem(struct fbtft_par *par, size_t offset, size_t len)
for (y = 0; y < yres / 8; y++) {
*buf = 0x00;
for (i = 0; i < 8; i++)
*buf |= (vmem16[(y * 8 + i) * xres + x] ? 1 : 0) << i;
if (vmem16[(y * 8 + i) * xres + x])
*buf |= BIT(i);
buf++;
}
}