lkml.org 
[lkml]   [2018]   [Sep]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] [PATCHv2 TRIVIAL] auxdisplay: remove unnecessary braces
Date
From: Ben Moore <benmoore422@gmail.com>

I have removed some unnecessary braces from if statements.
As well as inspecting the other driverfiles for similar
style issues.

Signed-off-by: Ben Moore <benmoore422@gmail.com>
---
drivers/auxdisplay/ht16k33.c | 4 ++--
drivers/auxdisplay/panel.c | 5 ++---
2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/auxdisplay/ht16k33.c b/drivers/auxdisplay/ht16k33.c
index a43276c76fc6..854bb2b90368 100644
--- a/drivers/auxdisplay/ht16k33.c
+++ b/drivers/auxdisplay/ht16k33.c
@@ -479,9 +479,9 @@ static int ht16k33_probe(struct i2c_client *client,

err = of_property_read_u32(node, "default-brightness-level",
&dft_brightness);
- if (err) {
+ if (err)
dft_brightness = MAX_BRIGHTNESS;
- } else if (dft_brightness > MAX_BRIGHTNESS) {
+ else if (dft_brightness > MAX_BRIGHTNESS) {
dev_warn(&client->dev,
"invalid default brightness level: %u, using %u\n",
dft_brightness, MAX_BRIGHTNESS);
diff --git a/drivers/auxdisplay/panel.c b/drivers/auxdisplay/panel.c
index 3b25a643058c..f769431fbb52 100644
--- a/drivers/auxdisplay/panel.c
+++ b/drivers/auxdisplay/panel.c
@@ -695,11 +695,10 @@ static void lcd_send_serial(int byte)
for (bit = 0; bit < 8; bit++) {
clear_bit(LCD_BIT_CL, bits); /* CLK low */
panel_set_bits();
- if (byte & 1) {
+ if (byte & 1)
set_bit(LCD_BIT_DA, bits);
- } else {
+ else
clear_bit(LCD_BIT_DA, bits);
- }

panel_set_bits();
udelay(2); /* maintain the data during 2 us before CLK up */
--
2.11.0
\
 
 \ /
  Last update: 2018-09-23 19:26    [W:0.093 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site