Skip to contentSkip to conversation

Staging: olpc_dcon: Remove multiple blank lines

PATCH New Aybuke Ozdemir 1 participant 3 messages Oct 16, 2015 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 Staging: olpc_dcon: Remove multiple blank lines

Remove multiple blank lines. Problem found using checkpatch.pl
CHECK: Please don't use multiple blank lines.

---
 drivers/staging/olpc_dcon/olpc_dcon.c | 2 --
 1 file changed, 2 deletions(-)
drivers/staging/olpc_dcon/olpc_dcon.c +0 -2
index 3f424d1..d0f86d3 100644
@@ -100,7 +100,6 @@ static int dcon_hw_init(struct dcon_priv *dcon, int is_init)
 	}
 	dcon_write(dcon, DCON_REG_MODE, dcon->disp_mode);
 
-
 	/* Set the scanline to interrupt on during resume */
 	dcon_write(dcon, DCON_REG_SCAN_INT, resumeline);
 
@@ -723,7 +722,6 @@ static int dcon_resume(struct device *dev)
 
 #endif /* CONFIG_PM */
 
-
 irqreturn_t dcon_interrupt(int irq, void *id)
 {
 	struct dcon_priv *dcon = id;
Signature · 1 line
1.9.1
#1 lore raw

PATCH 2/3 Staging: olpc_dcon: Use preferred kernel type

This patch "uint16_t" type instead of "u16" type was used. checkpatch.pl issue.

---
 drivers/staging/olpc_dcon/olpc_dcon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/olpc_dcon/olpc_dcon.c +1 -1
index d0f86d3..2c34f61 100644
@@ -60,7 +60,7 @@ static s32 dcon_read(struct dcon_priv *dcon, u8 reg)
 
 static int dcon_hw_init(struct dcon_priv *dcon, int is_init)
 {
-	uint16_t ver;
+	u16 ver;
 	int rc = 0;
 
 	ver = dcon_read(dcon, DCON_REG_ID);
Signature · 1 line
1.9.1
#2 lore raw

PATCH 3/3 Staging: olpc_dcon: Remove NULL comparison

In reply to Aybuke Ozdemir

Problem found using checkpatch.pl
CHECK: Comparison to NULL could be written "(!)dcon_device"

---
 drivers/staging/olpc_dcon/olpc_dcon.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/olpc_dcon/olpc_dcon.c +2 -2
index 2c34f61..f45b2ef 100644
@@ -616,7 +616,7 @@ static int dcon_probe(struct i2c_client *client, const struct i2c_device_id *id)
 
 	dcon_device = platform_device_alloc("dcon", -1);
 
-	if (dcon_device == NULL) {
+	if (!dcon_device) {
 		pr_err("Unable to create the DCON device\n");
 		rc = -ENOMEM;
 		goto eirq;
@@ -679,7 +679,7 @@ static int dcon_remove(struct i2c_client *client)
 
 	backlight_device_unregister(dcon->bl_dev);
 
-	if (dcon_device != NULL)
+	if (dcon_device)
 		platform_device_unregister(dcon_device);
 	cancel_work_sync(&dcon->switch_source);
 
Signature · 1 line
1.9.1