diff options
-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++; } } |