diff mbox

[4/5] Input: tca8418_keypad - increase severity of failures in probe()

Message ID 1352911688-5001-4-git-send-email-dmitry.torokhov@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Dmitry Torokhov Nov. 14, 2012, 4:48 p.m. UTC
Failures to build a keymap, request an IRQ, or register input device are
fatal for the driver, therefore the messages should have "error" severity
instead of "debug".

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
 drivers/input/keyboard/tca8418_keypad.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Alban Bedel Nov. 29, 2012, 1:49 p.m. UTC | #1
On Wed, 14 Nov 2012 08:48:07 -0800
Dmitry Torokhov <dmitry.torokhov@gmail.com> wrote:

> Failures to build a keymap, request an IRQ, or register input device are
> fatal for the driver, therefore the messages should have "error" severity
> instead of "debug".
> 
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

Reviewed-by: Alban Bedel <alban.bedel@avionic-design.de>

> ---
>  drivers/input/keyboard/tca8418_keypad.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/input/keyboard/tca8418_keypad.c b/drivers/input/keyboard/tca8418_keypad.c
> index 35340c3..10047eb 100644
> --- a/drivers/input/keyboard/tca8418_keypad.c
> +++ b/drivers/input/keyboard/tca8418_keypad.c
> @@ -348,7 +348,7 @@ static int __devinit tca8418_keypad_probe(struct i2c_client *client,
>  	error = matrix_keypad_build_keymap(keymap_data, NULL, rows, cols,
>  					   keypad_data->keymap, input);
>  	if (error) {
> -		dev_dbg(dev, "Failed to build keymap\n");
> +		dev_err(dev, "Failed to build keymap\n");
>  		goto fail2;
>  	}
>  
> @@ -367,14 +367,14 @@ static int __devinit tca8418_keypad_probe(struct i2c_client *client,
>  				     IRQF_ONESHOT,
>  				     client->name, keypad_data);
>  	if (error) {
> -		dev_dbg(dev, "Unable to claim irq %d; error %d\n",
> +		dev_err(dev, "Unable to claim irq %d; error %d\n",
>  			client->irq, error);
>  		goto fail2;
>  	}
>  
>  	error = input_register_device(input);
>  	if (error) {
> -		dev_dbg(dev, "Unable to register input device, error: %d\n",
> +		dev_err(dev, "Unable to register input device, error: %d\n",
>  			error);
>  		goto fail3;
>  	}

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/input/keyboard/tca8418_keypad.c b/drivers/input/keyboard/tca8418_keypad.c
index 35340c3..10047eb 100644
--- a/drivers/input/keyboard/tca8418_keypad.c
+++ b/drivers/input/keyboard/tca8418_keypad.c
@@ -348,7 +348,7 @@  static int __devinit tca8418_keypad_probe(struct i2c_client *client,
 	error = matrix_keypad_build_keymap(keymap_data, NULL, rows, cols,
 					   keypad_data->keymap, input);
 	if (error) {
-		dev_dbg(dev, "Failed to build keymap\n");
+		dev_err(dev, "Failed to build keymap\n");
 		goto fail2;
 	}
 
@@ -367,14 +367,14 @@  static int __devinit tca8418_keypad_probe(struct i2c_client *client,
 				     IRQF_ONESHOT,
 				     client->name, keypad_data);
 	if (error) {
-		dev_dbg(dev, "Unable to claim irq %d; error %d\n",
+		dev_err(dev, "Unable to claim irq %d; error %d\n",
 			client->irq, error);
 		goto fail2;
 	}
 
 	error = input_register_device(input);
 	if (error) {
-		dev_dbg(dev, "Unable to register input device, error: %d\n",
+		dev_err(dev, "Unable to register input device, error: %d\n",
 			error);
 		goto fail3;
 	}