提交 e54c2b0a 编写于 作者: B Bhagyashri Dighole 提交者: Greg Kroah-Hartman

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: NBhagyashri Dighole <digholebhagyashri@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 7945e278
......@@ -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++;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册