Skip to contentSkip to conversation

Input: bf54x-keys: ! has a higher priority than >

PATCH In review Bryan Wu 3 participants 3 messages Feb 5, 2009 – Feb 6, 2009

Subsystems (2)
lore
Share & tools
lore

Bryan Wu

author
#0 lore raw

PATCH 1/1 Input: bf54x-keys: ! has a higher priority than >

From: Roel Kluin <[email protected]>

---
 drivers/input/keyboard/bf54x-keys.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/input/keyboard/bf54x-keys.c +2 -2
index 1928401..ee855c5 100644
@@ -209,8 +209,8 @@ static int __devinit bfin_kpad_probe(struct platform_device *pdev)
 		goto out;
 	}
 
-	if (!pdata->debounce_time || !pdata->debounce_time > MAX_MULT ||
-	    !pdata->coldrive_time || !pdata->coldrive_time > MAX_MULT) {
+	if (!pdata->debounce_time || pdata->debounce_time > MAX_MULT ||
+	    !pdata->coldrive_time || pdata->coldrive_time > MAX_MULT) {
 		printk(KERN_ERR DRV_NAME
 			": Invalid Debounce/Columdrive Time from pdata\n");
 		bfin_write_KPAD_MSEL(0xFF0);	/* Default MSEL	*/
Signature · 1 line
1.5.6.3
#1 lore raw
Quoted 14 lines · On Thu, 5 Feb 2009 15:19:55 +0800 Bryan Wu <[email protected]> wrote:

From: Roel Kluin <[email protected]>

---
 drivers/input/keyboard/bf54x-keys.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/input/keyboard/bf54x-keys.c +0 -0
index 1928401..ee855c5 100644

drivers/input/keyboard/bf54x-keys.c static int __devinit bfin_kpad_probe(struct platform_device *pdev) · line 213

Quoted 7 lines
drivers/input/keyboard/bf54x-keys.c +2 -2
@@ -209,8 +209,8 @@ static int __devinit bfin_kpad_probe(struct platform_device *pdev)
 		goto out;
 	}
 
-	if (!pdata->debounce_time || !pdata->debounce_time > MAX_MULT ||
-	    !pdata->coldrive_time || !pdata->coldrive_time > MAX_MULT) {
+	if (!pdata->debounce_time || pdata->debounce_time > MAX_MULT ||
+	    !pdata->coldrive_time || pdata->coldrive_time > MAX_MULT) {

What is this `pdata' thing from which the data comes?

It seems a bit rude to kill the driver when we've detected an error which could easily be fixed up.

drivers/input/keyboard/bf54x-keys.c static int __devinit bfin_kpad_probe(struct platform_device *pdev) · line 215

Quoted 2 lines
drivers/input/keyboard/bf54x-keys.c +0 -0
 		printk(KERN_ERR DRV_NAME
 			": Invalid Debounce/Columdrive Time from pdata\n");

nit: a colon does not terminate a sentence.

This comment misspells "column".

#2 lore raw
Quoted 28 lines

From: Andrew Morton [mailto:[email protected]]
Sent: Thursday, February 05, 2009 11:01 PM
Subject: Re: [PATCH] Input: bf54x-keys: ! has a higher priority than >

Review

Quoted 10 lines · On Thu, 5 Feb 2009 15:19:55 +0800 Bryan Wu <[email protected]> wrote:

From: Roel Kluin <[email protected]>

---
 drivers/input/keyboard/bf54x-keys.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/drivers/input/keyboard/bf54x-keys.c

drivers/input/keyboard/bf54x-keys.c static int __devinit bfin_kpad_probe(struct

Quoted 4 lines

index 1928401..ee855c5 100644

drivers/input/keyboard/bf54x-keys.c +0 -0
@@ -209,8 +209,8 @@ static int __devinit bfin_kpad_probe(struct

platform_device *pdev)

Quoted 3 lines
drivers/input/keyboard/bf54x-keys.c +0 -0
 		goto out;
 	}
 
Quoted 6 lines

drivers/input/keyboard/bf54x-keys.c static int __devinit bfin_kpad_probe(struct platform_device *pdev) · line 213

Quoted 4 lines
drivers/input/keyboard/bf54x-keys.c +2 -2
-	if (!pdata->debounce_time || !pdata->debounce_time > MAX_MULT ||
-	    !pdata->coldrive_time || !pdata->coldrive_time > MAX_MULT) {
+	if (!pdata->debounce_time || pdata->debounce_time > MAX_MULT ||
+	    !pdata->coldrive_time || pdata->coldrive_time > MAX_MULT) {

What is this `pdata' thing from which the data comes?

Platform device data.

struct bfin_kpad_platform_data *pdata = pdev->dev.platform_data;

Quoted 3 lines

It seems a bit rude to kill the driver when we've detected an error which could easily be fixed up.

It actually just prints the error and then uses some default value later on.

Quoted 3 lines

drivers/input/keyboard/bf54x-keys.c static int __devinit bfin_kpad_probe(struct · line 215

Quoted 3 lines
drivers/input/keyboard/bf54x-keys.c +0 -0
 		printk(KERN_ERR DRV_NAME
 			": Invalid Debounce/Columdrive Time from

pdata\n");

Quoted 4 lines

nit: a colon does not terminate a sentence.

This comment misspells "column".

Bryan will send a patch addressing this typo.

Best regards,
Michael