From e54c2b0aefa6c7c6048667ae2ea729d5df94fb85 Mon Sep 17 00:00:00 2001 From: Bhagyashri Dighole Date: Tue, 19 Mar 2019 16:30:37 +0530 Subject: 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 Signed-off-by: Greg Kroah-Hartman --- drivers/staging/fbtft/fb_ssd1306.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/staging/fbtft') 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++; } } -- cgit v1.2.3-58-ga151