diff options
author | Bhagyashri Dighole <digholebhagyashri@gmail.com> | 2019-03-19 16:30:37 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-03-19 14:35:42 +0100 |
commit | e54c2b0aefa6c7c6048667ae2ea729d5df94fb85 (patch) | |
tree | b3228ba7fd42edbd0d68f7c47a5df300ca51ac9c /drivers/staging/fbtft | |
parent | 7945e2782604f330560e38035158e233e2863d71 (diff) |
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>
Diffstat (limited to 'drivers/staging/fbtft')
-rw-r--r-- | drivers/staging/fbtft/fb_ssd1306.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/fbtft/fb_ssd1306.c b/drivers/staging/fbtft/fb_ssd1306.c index d7c5e2e0eee9..6cf9df579e88 100644 --- a/drivers/staging/fbtft/fb_ssd1306.c +++ b/drivers/staging/fbtft/fb_ssd1306.c @@ -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++; } } |