diff options
author | Stephen Boyd <swboyd@chromium.org> | 2019-08-14 13:46:38 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2019-08-14 13:49:01 -0400 |
commit | 0bec8b7e5ca1a629f26173691526432f9d7cf8c1 (patch) | |
tree | 8b002ce844e53e1de228c0c581553473e948d86f | |
parent | f5d4c647d0ddcf4ffcb9ff584fba87a976addcbd (diff) |
Input: remove dev_err() usage after platform_get_irq()
We don't need dev_err() messages when platform_get_irq() fails now that
platform_get_irq() prints an error message itself when something goes
wrong. Let's remove these prints with a simple semantic patch.
// <smpl>
@@
expression ret;
struct platform_device *E;
@@
ret =
(
platform_get_irq(E, ...)
|
platform_get_irq_byname(E, ...)
);
if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>
While we're here, remove braces on if statements that only have one
statement (manually).
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
37 files changed, 44 insertions, 142 deletions
diff --git a/drivers/input/keyboard/bcm-keypad.c b/drivers/input/keyboard/bcm-keypad.c index e1cf63ee148f..2b771c3a5578 100644 --- a/drivers/input/keyboard/bcm-keypad.c +++ b/drivers/input/keyboard/bcm-keypad.c | |||
@@ -413,10 +413,8 @@ static int bcm_kp_probe(struct platform_device *pdev) | |||
413 | bcm_kp_stop(kp); | 413 | bcm_kp_stop(kp); |
414 | 414 | ||
415 | kp->irq = platform_get_irq(pdev, 0); | 415 | kp->irq = platform_get_irq(pdev, 0); |
416 | if (kp->irq < 0) { | 416 | if (kp->irq < 0) |
417 | dev_err(&pdev->dev, "no IRQ specified\n"); | ||
418 | return -EINVAL; | 417 | return -EINVAL; |
419 | } | ||
420 | 418 | ||
421 | error = devm_request_threaded_irq(&pdev->dev, kp->irq, | 419 | error = devm_request_threaded_irq(&pdev->dev, kp->irq, |
422 | NULL, bcm_kp_isr_thread, | 420 | NULL, bcm_kp_isr_thread, |
diff --git a/drivers/input/keyboard/davinci_keyscan.c b/drivers/input/keyboard/davinci_keyscan.c index 1d94928db922..f489cd585b33 100644 --- a/drivers/input/keyboard/davinci_keyscan.c +++ b/drivers/input/keyboard/davinci_keyscan.c | |||
@@ -192,7 +192,6 @@ static int __init davinci_ks_probe(struct platform_device *pdev) | |||
192 | 192 | ||
193 | davinci_ks->irq = platform_get_irq(pdev, 0); | 193 | davinci_ks->irq = platform_get_irq(pdev, 0); |
194 | if (davinci_ks->irq < 0) { | 194 | if (davinci_ks->irq < 0) { |
195 | dev_err(dev, "no key scan irq\n"); | ||
196 | error = davinci_ks->irq; | 195 | error = davinci_ks->irq; |
197 | goto fail2; | 196 | goto fail2; |
198 | } | 197 | } |
diff --git a/drivers/input/keyboard/imx_keypad.c b/drivers/input/keyboard/imx_keypad.c index 97500a2de2d5..5a46d113e909 100644 --- a/drivers/input/keyboard/imx_keypad.c +++ b/drivers/input/keyboard/imx_keypad.c | |||
@@ -430,10 +430,8 @@ static int imx_keypad_probe(struct platform_device *pdev) | |||
430 | } | 430 | } |
431 | 431 | ||
432 | irq = platform_get_irq(pdev, 0); | 432 | irq = platform_get_irq(pdev, 0); |
433 | if (irq < 0) { | 433 | if (irq < 0) |
434 | dev_err(&pdev->dev, "no irq defined in platform data\n"); | ||
435 | return irq; | 434 | return irq; |
436 | } | ||
437 | 435 | ||
438 | input_dev = devm_input_allocate_device(&pdev->dev); | 436 | input_dev = devm_input_allocate_device(&pdev->dev); |
439 | if (!input_dev) { | 437 | if (!input_dev) { |
diff --git a/drivers/input/keyboard/lpc32xx-keys.c b/drivers/input/keyboard/lpc32xx-keys.c index a34e3271b0c9..348af2aeb5de 100644 --- a/drivers/input/keyboard/lpc32xx-keys.c +++ b/drivers/input/keyboard/lpc32xx-keys.c | |||
@@ -172,10 +172,8 @@ static int lpc32xx_kscan_probe(struct platform_device *pdev) | |||
172 | } | 172 | } |
173 | 173 | ||
174 | irq = platform_get_irq(pdev, 0); | 174 | irq = platform_get_irq(pdev, 0); |
175 | if (irq < 0) { | 175 | if (irq < 0) |
176 | dev_err(&pdev->dev, "failed to get platform irq\n"); | ||
177 | return -EINVAL; | 176 | return -EINVAL; |
178 | } | ||
179 | 177 | ||
180 | kscandat = devm_kzalloc(&pdev->dev, sizeof(*kscandat), | 178 | kscandat = devm_kzalloc(&pdev->dev, sizeof(*kscandat), |
181 | GFP_KERNEL); | 179 | GFP_KERNEL); |
diff --git a/drivers/input/keyboard/nomadik-ske-keypad.c b/drivers/input/keyboard/nomadik-ske-keypad.c index fa265fdce2c4..608446e14614 100644 --- a/drivers/input/keyboard/nomadik-ske-keypad.c +++ b/drivers/input/keyboard/nomadik-ske-keypad.c | |||
@@ -235,10 +235,8 @@ static int __init ske_keypad_probe(struct platform_device *pdev) | |||
235 | } | 235 | } |
236 | 236 | ||
237 | irq = platform_get_irq(pdev, 0); | 237 | irq = platform_get_irq(pdev, 0); |
238 | if (irq < 0) { | 238 | if (irq < 0) |
239 | dev_err(&pdev->dev, "failed to get keypad irq\n"); | ||
240 | return -EINVAL; | 239 | return -EINVAL; |
241 | } | ||
242 | 240 | ||
243 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 241 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
244 | if (!res) { | 242 | if (!res) { |
diff --git a/drivers/input/keyboard/nspire-keypad.c b/drivers/input/keyboard/nspire-keypad.c index 57eac91ecd76..63d5e488137d 100644 --- a/drivers/input/keyboard/nspire-keypad.c +++ b/drivers/input/keyboard/nspire-keypad.c | |||
@@ -165,10 +165,8 @@ static int nspire_keypad_probe(struct platform_device *pdev) | |||
165 | int error; | 165 | int error; |
166 | 166 | ||
167 | irq = platform_get_irq(pdev, 0); | 167 | irq = platform_get_irq(pdev, 0); |
168 | if (irq < 0) { | 168 | if (irq < 0) |
169 | dev_err(&pdev->dev, "failed to get keypad irq\n"); | ||
170 | return -EINVAL; | 169 | return -EINVAL; |
171 | } | ||
172 | 170 | ||
173 | keypad = devm_kzalloc(&pdev->dev, sizeof(struct nspire_keypad), | 171 | keypad = devm_kzalloc(&pdev->dev, sizeof(struct nspire_keypad), |
174 | GFP_KERNEL); | 172 | GFP_KERNEL); |
diff --git a/drivers/input/keyboard/opencores-kbd.c b/drivers/input/keyboard/opencores-kbd.c index 159346cb4060..b0ea387414c1 100644 --- a/drivers/input/keyboard/opencores-kbd.c +++ b/drivers/input/keyboard/opencores-kbd.c | |||
@@ -49,10 +49,8 @@ static int opencores_kbd_probe(struct platform_device *pdev) | |||
49 | } | 49 | } |
50 | 50 | ||
51 | irq = platform_get_irq(pdev, 0); | 51 | irq = platform_get_irq(pdev, 0); |
52 | if (irq < 0) { | 52 | if (irq < 0) |
53 | dev_err(&pdev->dev, "missing board IRQ resource\n"); | ||
54 | return -EINVAL; | 53 | return -EINVAL; |
55 | } | ||
56 | 54 | ||
57 | opencores_kbd = devm_kzalloc(&pdev->dev, sizeof(*opencores_kbd), | 55 | opencores_kbd = devm_kzalloc(&pdev->dev, sizeof(*opencores_kbd), |
58 | GFP_KERNEL); | 56 | GFP_KERNEL); |
diff --git a/drivers/input/keyboard/pmic8xxx-keypad.c b/drivers/input/keyboard/pmic8xxx-keypad.c index d529768a1d06..91d5811d6f0e 100644 --- a/drivers/input/keyboard/pmic8xxx-keypad.c +++ b/drivers/input/keyboard/pmic8xxx-keypad.c | |||
@@ -544,16 +544,12 @@ static int pmic8xxx_kp_probe(struct platform_device *pdev) | |||
544 | } | 544 | } |
545 | 545 | ||
546 | kp->key_sense_irq = platform_get_irq(pdev, 0); | 546 | kp->key_sense_irq = platform_get_irq(pdev, 0); |
547 | if (kp->key_sense_irq < 0) { | 547 | if (kp->key_sense_irq < 0) |
548 | dev_err(&pdev->dev, "unable to get keypad sense irq\n"); | ||
549 | return kp->key_sense_irq; | 548 | return kp->key_sense_irq; |
550 | } | ||
551 | 549 | ||
552 | kp->key_stuck_irq = platform_get_irq(pdev, 1); | 550 | kp->key_stuck_irq = platform_get_irq(pdev, 1); |
553 | if (kp->key_stuck_irq < 0) { | 551 | if (kp->key_stuck_irq < 0) |
554 | dev_err(&pdev->dev, "unable to get keypad stuck irq\n"); | ||
555 | return kp->key_stuck_irq; | 552 | return kp->key_stuck_irq; |
556 | } | ||
557 | 553 | ||
558 | kp->input->name = "PMIC8XXX keypad"; | 554 | kp->input->name = "PMIC8XXX keypad"; |
559 | kp->input->phys = "pmic8xxx_keypad/input0"; | 555 | kp->input->phys = "pmic8xxx_keypad/input0"; |
diff --git a/drivers/input/keyboard/pxa27x_keypad.c b/drivers/input/keyboard/pxa27x_keypad.c index 39023664d2f2..7e65708b25a4 100644 --- a/drivers/input/keyboard/pxa27x_keypad.c +++ b/drivers/input/keyboard/pxa27x_keypad.c | |||
@@ -727,10 +727,8 @@ static int pxa27x_keypad_probe(struct platform_device *pdev) | |||
727 | return -EINVAL; | 727 | return -EINVAL; |
728 | 728 | ||
729 | irq = platform_get_irq(pdev, 0); | 729 | irq = platform_get_irq(pdev, 0); |
730 | if (irq < 0) { | 730 | if (irq < 0) |
731 | dev_err(&pdev->dev, "failed to get keypad irq\n"); | ||
732 | return -ENXIO; | 731 | return -ENXIO; |
733 | } | ||
734 | 732 | ||
735 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 733 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
736 | if (res == NULL) { | 734 | if (res == NULL) { |
diff --git a/drivers/input/keyboard/pxa930_rotary.c b/drivers/input/keyboard/pxa930_rotary.c index 585e7765cbf0..f7414091d94e 100644 --- a/drivers/input/keyboard/pxa930_rotary.c +++ b/drivers/input/keyboard/pxa930_rotary.c | |||
@@ -89,10 +89,8 @@ static int pxa930_rotary_probe(struct platform_device *pdev) | |||
89 | int err; | 89 | int err; |
90 | 90 | ||
91 | irq = platform_get_irq(pdev, 0); | 91 | irq = platform_get_irq(pdev, 0); |
92 | if (irq < 0) { | 92 | if (irq < 0) |
93 | dev_err(&pdev->dev, "no irq for rotary controller\n"); | ||
94 | return -ENXIO; | 93 | return -ENXIO; |
95 | } | ||
96 | 94 | ||
97 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 95 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
98 | if (!res) { | 96 | if (!res) { |
diff --git a/drivers/input/keyboard/sh_keysc.c b/drivers/input/keyboard/sh_keysc.c index 08ba41a81f14..27ad73f43451 100644 --- a/drivers/input/keyboard/sh_keysc.c +++ b/drivers/input/keyboard/sh_keysc.c | |||
@@ -181,10 +181,8 @@ static int sh_keysc_probe(struct platform_device *pdev) | |||
181 | } | 181 | } |
182 | 182 | ||
183 | irq = platform_get_irq(pdev, 0); | 183 | irq = platform_get_irq(pdev, 0); |
184 | if (irq < 0) { | 184 | if (irq < 0) |
185 | dev_err(&pdev->dev, "failed to get irq\n"); | ||
186 | goto err0; | 185 | goto err0; |
187 | } | ||
188 | 186 | ||
189 | priv = kzalloc(sizeof(*priv), GFP_KERNEL); | 187 | priv = kzalloc(sizeof(*priv), GFP_KERNEL); |
190 | if (priv == NULL) { | 188 | if (priv == NULL) { |
diff --git a/drivers/input/keyboard/snvs_pwrkey.c b/drivers/input/keyboard/snvs_pwrkey.c index 5342d8d45f81..e76b7a400a1c 100644 --- a/drivers/input/keyboard/snvs_pwrkey.c +++ b/drivers/input/keyboard/snvs_pwrkey.c | |||
@@ -118,10 +118,8 @@ static int imx_snvs_pwrkey_probe(struct platform_device *pdev) | |||
118 | pdata->wakeup = of_property_read_bool(np, "wakeup-source"); | 118 | pdata->wakeup = of_property_read_bool(np, "wakeup-source"); |
119 | 119 | ||
120 | pdata->irq = platform_get_irq(pdev, 0); | 120 | pdata->irq = platform_get_irq(pdev, 0); |
121 | if (pdata->irq < 0) { | 121 | if (pdata->irq < 0) |
122 | dev_err(&pdev->dev, "no irq defined in platform data\n"); | ||
123 | return -EINVAL; | 122 | return -EINVAL; |
124 | } | ||
125 | 123 | ||
126 | regmap_update_bits(pdata->snvs, SNVS_LPCR_REG, SNVS_LPCR_DEP_EN, SNVS_LPCR_DEP_EN); | 124 | regmap_update_bits(pdata->snvs, SNVS_LPCR_REG, SNVS_LPCR_DEP_EN, SNVS_LPCR_DEP_EN); |
127 | 125 | ||
diff --git a/drivers/input/keyboard/spear-keyboard.c b/drivers/input/keyboard/spear-keyboard.c index 7d25fa338ab4..9b8d78f87253 100644 --- a/drivers/input/keyboard/spear-keyboard.c +++ b/drivers/input/keyboard/spear-keyboard.c | |||
@@ -191,10 +191,8 @@ static int spear_kbd_probe(struct platform_device *pdev) | |||
191 | int error; | 191 | int error; |
192 | 192 | ||
193 | irq = platform_get_irq(pdev, 0); | 193 | irq = platform_get_irq(pdev, 0); |
194 | if (irq < 0) { | 194 | if (irq < 0) |
195 | dev_err(&pdev->dev, "not able to get irq for the device\n"); | ||
196 | return irq; | 195 | return irq; |
197 | } | ||
198 | 196 | ||
199 | kbd = devm_kzalloc(&pdev->dev, sizeof(*kbd), GFP_KERNEL); | 197 | kbd = devm_kzalloc(&pdev->dev, sizeof(*kbd), GFP_KERNEL); |
200 | if (!kbd) { | 198 | if (!kbd) { |
diff --git a/drivers/input/keyboard/st-keyscan.c b/drivers/input/keyboard/st-keyscan.c index f097128b93fe..27562cd67fb6 100644 --- a/drivers/input/keyboard/st-keyscan.c +++ b/drivers/input/keyboard/st-keyscan.c | |||
@@ -187,10 +187,8 @@ static int keyscan_probe(struct platform_device *pdev) | |||
187 | keyscan_stop(keypad_data); | 187 | keyscan_stop(keypad_data); |
188 | 188 | ||
189 | keypad_data->irq = platform_get_irq(pdev, 0); | 189 | keypad_data->irq = platform_get_irq(pdev, 0); |
190 | if (keypad_data->irq < 0) { | 190 | if (keypad_data->irq < 0) |
191 | dev_err(&pdev->dev, "no IRQ specified\n"); | ||
192 | return -EINVAL; | 191 | return -EINVAL; |
193 | } | ||
194 | 192 | ||
195 | error = devm_request_irq(&pdev->dev, keypad_data->irq, keyscan_isr, 0, | 193 | error = devm_request_irq(&pdev->dev, keypad_data->irq, keyscan_isr, 0, |
196 | pdev->name, keypad_data); | 194 | pdev->name, keypad_data); |
diff --git a/drivers/input/keyboard/tegra-kbc.c b/drivers/input/keyboard/tegra-kbc.c index a37a7a9e9171..d34d6947960f 100644 --- a/drivers/input/keyboard/tegra-kbc.c +++ b/drivers/input/keyboard/tegra-kbc.c | |||
@@ -631,10 +631,8 @@ static int tegra_kbc_probe(struct platform_device *pdev) | |||
631 | return -EINVAL; | 631 | return -EINVAL; |
632 | 632 | ||
633 | kbc->irq = platform_get_irq(pdev, 0); | 633 | kbc->irq = platform_get_irq(pdev, 0); |
634 | if (kbc->irq < 0) { | 634 | if (kbc->irq < 0) |
635 | dev_err(&pdev->dev, "failed to get keyboard IRQ\n"); | ||
636 | return -ENXIO; | 635 | return -ENXIO; |
637 | } | ||
638 | 636 | ||
639 | kbc->idev = devm_input_allocate_device(&pdev->dev); | 637 | kbc->idev = devm_input_allocate_device(&pdev->dev); |
640 | if (!kbc->idev) { | 638 | if (!kbc->idev) { |
diff --git a/drivers/input/misc/88pm80x_onkey.c b/drivers/input/misc/88pm80x_onkey.c index 45a09497f680..51c8a326fd06 100644 --- a/drivers/input/misc/88pm80x_onkey.c +++ b/drivers/input/misc/88pm80x_onkey.c | |||
@@ -77,7 +77,6 @@ static int pm80x_onkey_probe(struct platform_device *pdev) | |||
77 | 77 | ||
78 | info->irq = platform_get_irq(pdev, 0); | 78 | info->irq = platform_get_irq(pdev, 0); |
79 | if (info->irq < 0) { | 79 | if (info->irq < 0) { |
80 | dev_err(&pdev->dev, "No IRQ resource!\n"); | ||
81 | err = -EINVAL; | 80 | err = -EINVAL; |
82 | goto out; | 81 | goto out; |
83 | } | 82 | } |
diff --git a/drivers/input/misc/88pm860x_onkey.c b/drivers/input/misc/88pm860x_onkey.c index cc87443aa2ee..685995cad73f 100644 --- a/drivers/input/misc/88pm860x_onkey.c +++ b/drivers/input/misc/88pm860x_onkey.c | |||
@@ -64,10 +64,8 @@ static int pm860x_onkey_probe(struct platform_device *pdev) | |||
64 | int irq, ret; | 64 | int irq, ret; |
65 | 65 | ||
66 | irq = platform_get_irq(pdev, 0); | 66 | irq = platform_get_irq(pdev, 0); |
67 | if (irq < 0) { | 67 | if (irq < 0) |
68 | dev_err(&pdev->dev, "No IRQ resource!\n"); | ||
69 | return -EINVAL; | 68 | return -EINVAL; |
70 | } | ||
71 | 69 | ||
72 | info = devm_kzalloc(&pdev->dev, sizeof(struct pm860x_onkey_info), | 70 | info = devm_kzalloc(&pdev->dev, sizeof(struct pm860x_onkey_info), |
73 | GFP_KERNEL); | 71 | GFP_KERNEL); |
diff --git a/drivers/input/misc/ab8500-ponkey.c b/drivers/input/misc/ab8500-ponkey.c index 12b18a8db315..ea3b8292acdd 100644 --- a/drivers/input/misc/ab8500-ponkey.c +++ b/drivers/input/misc/ab8500-ponkey.c | |||
@@ -55,16 +55,12 @@ static int ab8500_ponkey_probe(struct platform_device *pdev) | |||
55 | int error; | 55 | int error; |
56 | 56 | ||
57 | irq_dbf = platform_get_irq_byname(pdev, "ONKEY_DBF"); | 57 | irq_dbf = platform_get_irq_byname(pdev, "ONKEY_DBF"); |
58 | if (irq_dbf < 0) { | 58 | if (irq_dbf < 0) |
59 | dev_err(&pdev->dev, "No IRQ for ONKEY_DBF, error=%d\n", irq_dbf); | ||
60 | return irq_dbf; | 59 | return irq_dbf; |
61 | } | ||
62 | 60 | ||
63 | irq_dbr = platform_get_irq_byname(pdev, "ONKEY_DBR"); | 61 | irq_dbr = platform_get_irq_byname(pdev, "ONKEY_DBR"); |
64 | if (irq_dbr < 0) { | 62 | if (irq_dbr < 0) |
65 | dev_err(&pdev->dev, "No IRQ for ONKEY_DBR, error=%d\n", irq_dbr); | ||
66 | return irq_dbr; | 63 | return irq_dbr; |
67 | } | ||
68 | 64 | ||
69 | ponkey = devm_kzalloc(&pdev->dev, sizeof(struct ab8500_ponkey), | 65 | ponkey = devm_kzalloc(&pdev->dev, sizeof(struct ab8500_ponkey), |
70 | GFP_KERNEL); | 66 | GFP_KERNEL); |
diff --git a/drivers/input/misc/axp20x-pek.c b/drivers/input/misc/axp20x-pek.c index 235925b28772..17c1cca74498 100644 --- a/drivers/input/misc/axp20x-pek.c +++ b/drivers/input/misc/axp20x-pek.c | |||
@@ -229,20 +229,14 @@ static int axp20x_pek_probe_input_device(struct axp20x_pek *axp20x_pek, | |||
229 | int error; | 229 | int error; |
230 | 230 | ||
231 | axp20x_pek->irq_dbr = platform_get_irq_byname(pdev, "PEK_DBR"); | 231 | axp20x_pek->irq_dbr = platform_get_irq_byname(pdev, "PEK_DBR"); |
232 | if (axp20x_pek->irq_dbr < 0) { | 232 | if (axp20x_pek->irq_dbr < 0) |
233 | dev_err(&pdev->dev, "No IRQ for PEK_DBR, error=%d\n", | ||
234 | axp20x_pek->irq_dbr); | ||
235 | return axp20x_pek->irq_dbr; | 233 | return axp20x_pek->irq_dbr; |
236 | } | ||
237 | axp20x_pek->irq_dbr = regmap_irq_get_virq(axp20x->regmap_irqc, | 234 | axp20x_pek->irq_dbr = regmap_irq_get_virq(axp20x->regmap_irqc, |
238 | axp20x_pek->irq_dbr); | 235 | axp20x_pek->irq_dbr); |
239 | 236 | ||
240 | axp20x_pek->irq_dbf = platform_get_irq_byname(pdev, "PEK_DBF"); | 237 | axp20x_pek->irq_dbf = platform_get_irq_byname(pdev, "PEK_DBF"); |
241 | if (axp20x_pek->irq_dbf < 0) { | 238 | if (axp20x_pek->irq_dbf < 0) |
242 | dev_err(&pdev->dev, "No IRQ for PEK_DBF, error=%d\n", | ||
243 | axp20x_pek->irq_dbf); | ||
244 | return axp20x_pek->irq_dbf; | 239 | return axp20x_pek->irq_dbf; |
245 | } | ||
246 | axp20x_pek->irq_dbf = regmap_irq_get_virq(axp20x->regmap_irqc, | 240 | axp20x_pek->irq_dbf = regmap_irq_get_virq(axp20x->regmap_irqc, |
247 | axp20x_pek->irq_dbf); | 241 | axp20x_pek->irq_dbf); |
248 | 242 | ||
diff --git a/drivers/input/misc/da9055_onkey.c b/drivers/input/misc/da9055_onkey.c index a4ff4782e605..7a0d3a1d503c 100644 --- a/drivers/input/misc/da9055_onkey.c +++ b/drivers/input/misc/da9055_onkey.c | |||
@@ -76,11 +76,8 @@ static int da9055_onkey_probe(struct platform_device *pdev) | |||
76 | int irq, err; | 76 | int irq, err; |
77 | 77 | ||
78 | irq = platform_get_irq_byname(pdev, "ONKEY"); | 78 | irq = platform_get_irq_byname(pdev, "ONKEY"); |
79 | if (irq < 0) { | 79 | if (irq < 0) |
80 | dev_err(&pdev->dev, | ||
81 | "Failed to get an IRQ for input device, %d\n", irq); | ||
82 | return -EINVAL; | 80 | return -EINVAL; |
83 | } | ||
84 | 81 | ||
85 | onkey = devm_kzalloc(&pdev->dev, sizeof(*onkey), GFP_KERNEL); | 82 | onkey = devm_kzalloc(&pdev->dev, sizeof(*onkey), GFP_KERNEL); |
86 | if (!onkey) { | 83 | if (!onkey) { |
diff --git a/drivers/input/misc/da9063_onkey.c b/drivers/input/misc/da9063_onkey.c index fd355cf59397..dace8577fa43 100644 --- a/drivers/input/misc/da9063_onkey.c +++ b/drivers/input/misc/da9063_onkey.c | |||
@@ -248,11 +248,8 @@ static int da9063_onkey_probe(struct platform_device *pdev) | |||
248 | } | 248 | } |
249 | 249 | ||
250 | irq = platform_get_irq_byname(pdev, "ONKEY"); | 250 | irq = platform_get_irq_byname(pdev, "ONKEY"); |
251 | if (irq < 0) { | 251 | if (irq < 0) |
252 | error = irq; | 252 | return irq; |
253 | dev_err(&pdev->dev, "Failed to get platform IRQ: %d\n", error); | ||
254 | return error; | ||
255 | } | ||
256 | 253 | ||
257 | error = devm_request_threaded_irq(&pdev->dev, irq, | 254 | error = devm_request_threaded_irq(&pdev->dev, irq, |
258 | NULL, da9063_onkey_irq_handler, | 255 | NULL, da9063_onkey_irq_handler, |
diff --git a/drivers/input/misc/e3x0-button.c b/drivers/input/misc/e3x0-button.c index 4d7217f43888..e2fde6e1553f 100644 --- a/drivers/input/misc/e3x0-button.c +++ b/drivers/input/misc/e3x0-button.c | |||
@@ -65,18 +65,12 @@ static int e3x0_button_probe(struct platform_device *pdev) | |||
65 | int error; | 65 | int error; |
66 | 66 | ||
67 | irq_press = platform_get_irq_byname(pdev, "press"); | 67 | irq_press = platform_get_irq_byname(pdev, "press"); |
68 | if (irq_press < 0) { | 68 | if (irq_press < 0) |
69 | dev_err(&pdev->dev, "No IRQ for 'press', error=%d\n", | ||
70 | irq_press); | ||
71 | return irq_press; | 69 | return irq_press; |
72 | } | ||
73 | 70 | ||
74 | irq_release = platform_get_irq_byname(pdev, "release"); | 71 | irq_release = platform_get_irq_byname(pdev, "release"); |
75 | if (irq_release < 0) { | 72 | if (irq_release < 0) |
76 | dev_err(&pdev->dev, "No IRQ for 'release', error=%d\n", | ||
77 | irq_release); | ||
78 | return irq_release; | 73 | return irq_release; |
79 | } | ||
80 | 74 | ||
81 | input = devm_input_allocate_device(&pdev->dev); | 75 | input = devm_input_allocate_device(&pdev->dev); |
82 | if (!input) | 76 | if (!input) |
diff --git a/drivers/input/misc/hisi_powerkey.c b/drivers/input/misc/hisi_powerkey.c index dee6245f38d7..d3c293a95d32 100644 --- a/drivers/input/misc/hisi_powerkey.c +++ b/drivers/input/misc/hisi_powerkey.c | |||
@@ -90,12 +90,8 @@ static int hi65xx_powerkey_probe(struct platform_device *pdev) | |||
90 | for (i = 0; i < ARRAY_SIZE(hi65xx_irq_info); i++) { | 90 | for (i = 0; i < ARRAY_SIZE(hi65xx_irq_info); i++) { |
91 | 91 | ||
92 | irq = platform_get_irq_byname(pdev, hi65xx_irq_info[i].name); | 92 | irq = platform_get_irq_byname(pdev, hi65xx_irq_info[i].name); |
93 | if (irq < 0) { | 93 | if (irq < 0) |
94 | error = irq; | 94 | return irq; |
95 | dev_err(dev, "couldn't get irq %s: %d\n", | ||
96 | hi65xx_irq_info[i].name, error); | ||
97 | return error; | ||
98 | } | ||
99 | 95 | ||
100 | error = devm_request_any_context_irq(dev, irq, | 96 | error = devm_request_any_context_irq(dev, irq, |
101 | hi65xx_irq_info[i].handler, | 97 | hi65xx_irq_info[i].handler, |
diff --git a/drivers/input/misc/max8925_onkey.c b/drivers/input/misc/max8925_onkey.c index 7c49b8d23894..ffab4a490c75 100644 --- a/drivers/input/misc/max8925_onkey.c +++ b/drivers/input/misc/max8925_onkey.c | |||
@@ -71,16 +71,12 @@ static int max8925_onkey_probe(struct platform_device *pdev) | |||
71 | int irq[2], error; | 71 | int irq[2], error; |
72 | 72 | ||
73 | irq[0] = platform_get_irq(pdev, 0); | 73 | irq[0] = platform_get_irq(pdev, 0); |
74 | if (irq[0] < 0) { | 74 | if (irq[0] < 0) |
75 | dev_err(&pdev->dev, "No IRQ resource!\n"); | ||
76 | return -EINVAL; | 75 | return -EINVAL; |
77 | } | ||
78 | 76 | ||
79 | irq[1] = platform_get_irq(pdev, 1); | 77 | irq[1] = platform_get_irq(pdev, 1); |
80 | if (irq[1] < 0) { | 78 | if (irq[1] < 0) |
81 | dev_err(&pdev->dev, "No IRQ resource!\n"); | ||
82 | return -EINVAL; | 79 | return -EINVAL; |
83 | } | ||
84 | 80 | ||
85 | info = devm_kzalloc(&pdev->dev, sizeof(struct max8925_onkey_info), | 81 | info = devm_kzalloc(&pdev->dev, sizeof(struct max8925_onkey_info), |
86 | GFP_KERNEL); | 82 | GFP_KERNEL); |
diff --git a/drivers/input/misc/pm8941-pwrkey.c b/drivers/input/misc/pm8941-pwrkey.c index 017f81a66658..cf8104454e74 100644 --- a/drivers/input/misc/pm8941-pwrkey.c +++ b/drivers/input/misc/pm8941-pwrkey.c | |||
@@ -205,10 +205,8 @@ static int pm8941_pwrkey_probe(struct platform_device *pdev) | |||
205 | return error; | 205 | return error; |
206 | 206 | ||
207 | pwrkey->irq = platform_get_irq(pdev, 0); | 207 | pwrkey->irq = platform_get_irq(pdev, 0); |
208 | if (pwrkey->irq < 0) { | 208 | if (pwrkey->irq < 0) |
209 | dev_err(&pdev->dev, "failed to get irq\n"); | ||
210 | return pwrkey->irq; | 209 | return pwrkey->irq; |
211 | } | ||
212 | 210 | ||
213 | error = regmap_read(pwrkey->regmap, pwrkey->baseaddr + PON_REV2, | 211 | error = regmap_read(pwrkey->regmap, pwrkey->baseaddr + PON_REV2, |
214 | &pwrkey->revision); | 212 | &pwrkey->revision); |
diff --git a/drivers/input/misc/rk805-pwrkey.c b/drivers/input/misc/rk805-pwrkey.c index 4a6d4a5746e5..3fb64dbda1a2 100644 --- a/drivers/input/misc/rk805-pwrkey.c +++ b/drivers/input/misc/rk805-pwrkey.c | |||
@@ -53,16 +53,12 @@ static int rk805_pwrkey_probe(struct platform_device *pdev) | |||
53 | input_set_capability(pwr, EV_KEY, KEY_POWER); | 53 | input_set_capability(pwr, EV_KEY, KEY_POWER); |
54 | 54 | ||
55 | fall_irq = platform_get_irq(pdev, 0); | 55 | fall_irq = platform_get_irq(pdev, 0); |
56 | if (fall_irq < 0) { | 56 | if (fall_irq < 0) |
57 | dev_err(&pdev->dev, "Can't get fall irq: %d\n", fall_irq); | ||
58 | return fall_irq; | 57 | return fall_irq; |
59 | } | ||
60 | 58 | ||
61 | rise_irq = platform_get_irq(pdev, 1); | 59 | rise_irq = platform_get_irq(pdev, 1); |
62 | if (rise_irq < 0) { | 60 | if (rise_irq < 0) |
63 | dev_err(&pdev->dev, "Can't get rise irq: %d\n", rise_irq); | ||
64 | return rise_irq; | 61 | return rise_irq; |
65 | } | ||
66 | 62 | ||
67 | err = devm_request_any_context_irq(&pwr->dev, fall_irq, | 63 | err = devm_request_any_context_irq(&pwr->dev, fall_irq, |
68 | pwrkey_fall_irq, | 64 | pwrkey_fall_irq, |
diff --git a/drivers/input/misc/stpmic1_onkey.c b/drivers/input/misc/stpmic1_onkey.c index 7b49c9997df7..d8dc2f2f8000 100644 --- a/drivers/input/misc/stpmic1_onkey.c +++ b/drivers/input/misc/stpmic1_onkey.c | |||
@@ -61,18 +61,12 @@ static int stpmic1_onkey_probe(struct platform_device *pdev) | |||
61 | return -ENOMEM; | 61 | return -ENOMEM; |
62 | 62 | ||
63 | onkey->irq_falling = platform_get_irq_byname(pdev, "onkey-falling"); | 63 | onkey->irq_falling = platform_get_irq_byname(pdev, "onkey-falling"); |
64 | if (onkey->irq_falling < 0) { | 64 | if (onkey->irq_falling < 0) |
65 | dev_err(dev, "failed: request IRQ onkey-falling %d\n", | ||
66 | onkey->irq_falling); | ||
67 | return onkey->irq_falling; | 65 | return onkey->irq_falling; |
68 | } | ||
69 | 66 | ||
70 | onkey->irq_rising = platform_get_irq_byname(pdev, "onkey-rising"); | 67 | onkey->irq_rising = platform_get_irq_byname(pdev, "onkey-rising"); |
71 | if (onkey->irq_rising < 0) { | 68 | if (onkey->irq_rising < 0) |
72 | dev_err(dev, "failed: request IRQ onkey-rising %d\n", | ||
73 | onkey->irq_rising); | ||
74 | return onkey->irq_rising; | 69 | return onkey->irq_rising; |
75 | } | ||
76 | 70 | ||
77 | if (!device_property_read_u32(dev, "power-off-time-sec", &val)) { | 71 | if (!device_property_read_u32(dev, "power-off-time-sec", &val)) { |
78 | if (val > 0 && val <= 16) { | 72 | if (val > 0 && val <= 16) { |
diff --git a/drivers/input/misc/tps65218-pwrbutton.c b/drivers/input/misc/tps65218-pwrbutton.c index a4455bb12ae0..f011447c44fb 100644 --- a/drivers/input/misc/tps65218-pwrbutton.c +++ b/drivers/input/misc/tps65218-pwrbutton.c | |||
@@ -124,10 +124,8 @@ static int tps6521x_pb_probe(struct platform_device *pdev) | |||
124 | device_init_wakeup(dev, true); | 124 | device_init_wakeup(dev, true); |
125 | 125 | ||
126 | irq = platform_get_irq(pdev, 0); | 126 | irq = platform_get_irq(pdev, 0); |
127 | if (irq < 0) { | 127 | if (irq < 0) |
128 | dev_err(dev, "No IRQ resource!\n"); | ||
129 | return -EINVAL; | 128 | return -EINVAL; |
130 | } | ||
131 | 129 | ||
132 | error = devm_request_threaded_irq(dev, irq, NULL, tps6521x_pb_irq, | 130 | error = devm_request_threaded_irq(dev, irq, NULL, tps6521x_pb_irq, |
133 | IRQF_TRIGGER_RISING | | 131 | IRQF_TRIGGER_RISING | |
diff --git a/drivers/input/misc/twl6040-vibra.c b/drivers/input/misc/twl6040-vibra.c index 93235a007d07..bf6644927630 100644 --- a/drivers/input/misc/twl6040-vibra.c +++ b/drivers/input/misc/twl6040-vibra.c | |||
@@ -272,10 +272,8 @@ static int twl6040_vibra_probe(struct platform_device *pdev) | |||
272 | } | 272 | } |
273 | 273 | ||
274 | info->irq = platform_get_irq(pdev, 0); | 274 | info->irq = platform_get_irq(pdev, 0); |
275 | if (info->irq < 0) { | 275 | if (info->irq < 0) |
276 | dev_err(info->dev, "invalid irq\n"); | ||
277 | return -EINVAL; | 276 | return -EINVAL; |
278 | } | ||
279 | 277 | ||
280 | error = devm_request_threaded_irq(&pdev->dev, info->irq, NULL, | 278 | error = devm_request_threaded_irq(&pdev->dev, info->irq, NULL, |
281 | twl6040_vib_irq_handler, | 279 | twl6040_vib_irq_handler, |
diff --git a/drivers/input/mouse/pxa930_trkball.c b/drivers/input/mouse/pxa930_trkball.c index 87bac8cff6f7..41acde60b60f 100644 --- a/drivers/input/mouse/pxa930_trkball.c +++ b/drivers/input/mouse/pxa930_trkball.c | |||
@@ -147,10 +147,8 @@ static int pxa930_trkball_probe(struct platform_device *pdev) | |||
147 | int irq, error; | 147 | int irq, error; |
148 | 148 | ||
149 | irq = platform_get_irq(pdev, 0); | 149 | irq = platform_get_irq(pdev, 0); |
150 | if (irq < 0) { | 150 | if (irq < 0) |
151 | dev_err(&pdev->dev, "failed to get trkball irq\n"); | ||
152 | return -ENXIO; | 151 | return -ENXIO; |
153 | } | ||
154 | 152 | ||
155 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 153 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
156 | if (!res) { | 154 | if (!res) { |
diff --git a/drivers/input/serio/arc_ps2.c b/drivers/input/serio/arc_ps2.c index 443194a2b9e3..0af9fba5d16d 100644 --- a/drivers/input/serio/arc_ps2.c +++ b/drivers/input/serio/arc_ps2.c | |||
@@ -187,10 +187,8 @@ static int arc_ps2_probe(struct platform_device *pdev) | |||
187 | int error, id, i; | 187 | int error, id, i; |
188 | 188 | ||
189 | irq = platform_get_irq_byname(pdev, "arc_ps2_irq"); | 189 | irq = platform_get_irq_byname(pdev, "arc_ps2_irq"); |
190 | if (irq < 0) { | 190 | if (irq < 0) |
191 | dev_err(&pdev->dev, "no IRQ defined\n"); | ||
192 | return -EINVAL; | 191 | return -EINVAL; |
193 | } | ||
194 | 192 | ||
195 | arc_ps2 = devm_kzalloc(&pdev->dev, sizeof(struct arc_ps2_data), | 193 | arc_ps2 = devm_kzalloc(&pdev->dev, sizeof(struct arc_ps2_data), |
196 | GFP_KERNEL); | 194 | GFP_KERNEL); |
diff --git a/drivers/input/serio/ps2-gpio.c b/drivers/input/serio/ps2-gpio.c index e0f18469d01b..8970b49ea09a 100644 --- a/drivers/input/serio/ps2-gpio.c +++ b/drivers/input/serio/ps2-gpio.c | |||
@@ -369,8 +369,6 @@ static int ps2_gpio_probe(struct platform_device *pdev) | |||
369 | 369 | ||
370 | drvdata->irq = platform_get_irq(pdev, 0); | 370 | drvdata->irq = platform_get_irq(pdev, 0); |
371 | if (drvdata->irq < 0) { | 371 | if (drvdata->irq < 0) { |
372 | dev_err(dev, "failed to get irq from platform resource: %d\n", | ||
373 | drvdata->irq); | ||
374 | error = drvdata->irq; | 372 | error = drvdata->irq; |
375 | goto err_free_serio; | 373 | goto err_free_serio; |
376 | } | 374 | } |
diff --git a/drivers/input/touchscreen/88pm860x-ts.c b/drivers/input/touchscreen/88pm860x-ts.c index 1d1bbc8da949..81a3ea4b9a3d 100644 --- a/drivers/input/touchscreen/88pm860x-ts.c +++ b/drivers/input/touchscreen/88pm860x-ts.c | |||
@@ -185,10 +185,8 @@ static int pm860x_touch_probe(struct platform_device *pdev) | |||
185 | int irq, ret, res_x = 0, data = 0; | 185 | int irq, ret, res_x = 0, data = 0; |
186 | 186 | ||
187 | irq = platform_get_irq(pdev, 0); | 187 | irq = platform_get_irq(pdev, 0); |
188 | if (irq < 0) { | 188 | if (irq < 0) |
189 | dev_err(&pdev->dev, "No IRQ resource!\n"); | ||
190 | return -EINVAL; | 189 | return -EINVAL; |
191 | } | ||
192 | 190 | ||
193 | if (pm860x_touch_dt_init(pdev, chip, &res_x)) { | 191 | if (pm860x_touch_dt_init(pdev, chip, &res_x)) { |
194 | if (pdata) { | 192 | if (pdata) { |
diff --git a/drivers/input/touchscreen/bcm_iproc_tsc.c b/drivers/input/touchscreen/bcm_iproc_tsc.c index 4d11b27c7c43..7de1fd24ce36 100644 --- a/drivers/input/touchscreen/bcm_iproc_tsc.c +++ b/drivers/input/touchscreen/bcm_iproc_tsc.c | |||
@@ -489,10 +489,8 @@ static int iproc_ts_probe(struct platform_device *pdev) | |||
489 | 489 | ||
490 | /* get interrupt */ | 490 | /* get interrupt */ |
491 | irq = platform_get_irq(pdev, 0); | 491 | irq = platform_get_irq(pdev, 0); |
492 | if (irq < 0) { | 492 | if (irq < 0) |
493 | dev_err(&pdev->dev, "platform_get_irq failed: %d\n", irq); | ||
494 | return irq; | 493 | return irq; |
495 | } | ||
496 | 494 | ||
497 | error = devm_request_irq(&pdev->dev, irq, | 495 | error = devm_request_irq(&pdev->dev, irq, |
498 | iproc_touchscreen_interrupt, | 496 | iproc_touchscreen_interrupt, |
diff --git a/drivers/input/touchscreen/fsl-imx25-tcq.c b/drivers/input/touchscreen/fsl-imx25-tcq.c index b66df8ab89f2..60a7246c5157 100644 --- a/drivers/input/touchscreen/fsl-imx25-tcq.c +++ b/drivers/input/touchscreen/fsl-imx25-tcq.c | |||
@@ -526,10 +526,8 @@ static int mx25_tcq_probe(struct platform_device *pdev) | |||
526 | } | 526 | } |
527 | 527 | ||
528 | priv->irq = platform_get_irq(pdev, 0); | 528 | priv->irq = platform_get_irq(pdev, 0); |
529 | if (priv->irq <= 0) { | 529 | if (priv->irq <= 0) |
530 | dev_err(dev, "Failed to get IRQ\n"); | ||
531 | return priv->irq; | 530 | return priv->irq; |
532 | } | ||
533 | 531 | ||
534 | idev = devm_input_allocate_device(dev); | 532 | idev = devm_input_allocate_device(dev); |
535 | if (!idev) { | 533 | if (!idev) { |
diff --git a/drivers/input/touchscreen/imx6ul_tsc.c b/drivers/input/touchscreen/imx6ul_tsc.c index e04eecd65bbb..9ed258854349 100644 --- a/drivers/input/touchscreen/imx6ul_tsc.c +++ b/drivers/input/touchscreen/imx6ul_tsc.c | |||
@@ -430,16 +430,12 @@ static int imx6ul_tsc_probe(struct platform_device *pdev) | |||
430 | } | 430 | } |
431 | 431 | ||
432 | tsc_irq = platform_get_irq(pdev, 0); | 432 | tsc_irq = platform_get_irq(pdev, 0); |
433 | if (tsc_irq < 0) { | 433 | if (tsc_irq < 0) |
434 | dev_err(&pdev->dev, "no tsc irq resource?\n"); | ||
435 | return tsc_irq; | 434 | return tsc_irq; |
436 | } | ||
437 | 435 | ||
438 | adc_irq = platform_get_irq(pdev, 1); | 436 | adc_irq = platform_get_irq(pdev, 1); |
439 | if (adc_irq < 0) { | 437 | if (adc_irq < 0) |
440 | dev_err(&pdev->dev, "no adc irq resource?\n"); | ||
441 | return adc_irq; | 438 | return adc_irq; |
442 | } | ||
443 | 439 | ||
444 | err = devm_request_threaded_irq(tsc->dev, tsc_irq, | 440 | err = devm_request_threaded_irq(tsc->dev, tsc_irq, |
445 | NULL, tsc_irq_fn, IRQF_ONESHOT, | 441 | NULL, tsc_irq_fn, IRQF_ONESHOT, |
diff --git a/drivers/input/touchscreen/lpc32xx_ts.c b/drivers/input/touchscreen/lpc32xx_ts.c index 567ed64b5392..b2cd9472e2d1 100644 --- a/drivers/input/touchscreen/lpc32xx_ts.c +++ b/drivers/input/touchscreen/lpc32xx_ts.c | |||
@@ -212,10 +212,8 @@ static int lpc32xx_ts_probe(struct platform_device *pdev) | |||
212 | } | 212 | } |
213 | 213 | ||
214 | irq = platform_get_irq(pdev, 0); | 214 | irq = platform_get_irq(pdev, 0); |
215 | if (irq < 0) { | 215 | if (irq < 0) |
216 | dev_err(&pdev->dev, "Can't get interrupt resource\n"); | ||
217 | return irq; | 216 | return irq; |
218 | } | ||
219 | 217 | ||
220 | tsc = kzalloc(sizeof(*tsc), GFP_KERNEL); | 218 | tsc = kzalloc(sizeof(*tsc), GFP_KERNEL); |
221 | input = input_allocate_device(); | 219 | input = input_allocate_device(); |