Commit 0bec8b7e authored by Stephen Boyd's avatar Stephen Boyd Committed by Dmitry Torokhov

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: default avatarStephen Boyd <swboyd@chromium.org>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent f5d4c647
...@@ -413,10 +413,8 @@ static int bcm_kp_probe(struct platform_device *pdev) ...@@ -413,10 +413,8 @@ static int bcm_kp_probe(struct platform_device *pdev)
bcm_kp_stop(kp); bcm_kp_stop(kp);
kp->irq = platform_get_irq(pdev, 0); kp->irq = platform_get_irq(pdev, 0);
if (kp->irq < 0) { if (kp->irq < 0)
dev_err(&pdev->dev, "no IRQ specified\n");
return -EINVAL; return -EINVAL;
}
error = devm_request_threaded_irq(&pdev->dev, kp->irq, error = devm_request_threaded_irq(&pdev->dev, kp->irq,
NULL, bcm_kp_isr_thread, NULL, bcm_kp_isr_thread,
......
...@@ -192,7 +192,6 @@ static int __init davinci_ks_probe(struct platform_device *pdev) ...@@ -192,7 +192,6 @@ static int __init davinci_ks_probe(struct platform_device *pdev)
davinci_ks->irq = platform_get_irq(pdev, 0); davinci_ks->irq = platform_get_irq(pdev, 0);
if (davinci_ks->irq < 0) { if (davinci_ks->irq < 0) {
dev_err(dev, "no key scan irq\n");
error = davinci_ks->irq; error = davinci_ks->irq;
goto fail2; goto fail2;
} }
......
...@@ -430,10 +430,8 @@ static int imx_keypad_probe(struct platform_device *pdev) ...@@ -430,10 +430,8 @@ static int imx_keypad_probe(struct platform_device *pdev)
} }
irq = platform_get_irq(pdev, 0); irq = platform_get_irq(pdev, 0);
if (irq < 0) { if (irq < 0)
dev_err(&pdev->dev, "no irq defined in platform data\n");
return irq; return irq;
}
input_dev = devm_input_allocate_device(&pdev->dev); input_dev = devm_input_allocate_device(&pdev->dev);
if (!input_dev) { if (!input_dev) {
......
...@@ -172,10 +172,8 @@ static int lpc32xx_kscan_probe(struct platform_device *pdev) ...@@ -172,10 +172,8 @@ static int lpc32xx_kscan_probe(struct platform_device *pdev)
} }
irq = platform_get_irq(pdev, 0); irq = platform_get_irq(pdev, 0);
if (irq < 0) { if (irq < 0)
dev_err(&pdev->dev, "failed to get platform irq\n");
return -EINVAL; return -EINVAL;
}
kscandat = devm_kzalloc(&pdev->dev, sizeof(*kscandat), kscandat = devm_kzalloc(&pdev->dev, sizeof(*kscandat),
GFP_KERNEL); GFP_KERNEL);
......
...@@ -235,10 +235,8 @@ static int __init ske_keypad_probe(struct platform_device *pdev) ...@@ -235,10 +235,8 @@ static int __init ske_keypad_probe(struct platform_device *pdev)
} }
irq = platform_get_irq(pdev, 0); irq = platform_get_irq(pdev, 0);
if (irq < 0) { if (irq < 0)
dev_err(&pdev->dev, "failed to get keypad irq\n");
return -EINVAL; return -EINVAL;
}
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) { if (!res) {
......
...@@ -165,10 +165,8 @@ static int nspire_keypad_probe(struct platform_device *pdev) ...@@ -165,10 +165,8 @@ static int nspire_keypad_probe(struct platform_device *pdev)
int error; int error;
irq = platform_get_irq(pdev, 0); irq = platform_get_irq(pdev, 0);
if (irq < 0) { if (irq < 0)
dev_err(&pdev->dev, "failed to get keypad irq\n");
return -EINVAL; return -EINVAL;
}
keypad = devm_kzalloc(&pdev->dev, sizeof(struct nspire_keypad), keypad = devm_kzalloc(&pdev->dev, sizeof(struct nspire_keypad),
GFP_KERNEL); GFP_KERNEL);
......
...@@ -49,10 +49,8 @@ static int opencores_kbd_probe(struct platform_device *pdev) ...@@ -49,10 +49,8 @@ static int opencores_kbd_probe(struct platform_device *pdev)
} }
irq = platform_get_irq(pdev, 0); irq = platform_get_irq(pdev, 0);
if (irq < 0) { if (irq < 0)
dev_err(&pdev->dev, "missing board IRQ resource\n");
return -EINVAL; return -EINVAL;
}
opencores_kbd = devm_kzalloc(&pdev->dev, sizeof(*opencores_kbd), opencores_kbd = devm_kzalloc(&pdev->dev, sizeof(*opencores_kbd),
GFP_KERNEL); GFP_KERNEL);
......
...@@ -544,16 +544,12 @@ static int pmic8xxx_kp_probe(struct platform_device *pdev) ...@@ -544,16 +544,12 @@ static int pmic8xxx_kp_probe(struct platform_device *pdev)
} }
kp->key_sense_irq = platform_get_irq(pdev, 0); kp->key_sense_irq = platform_get_irq(pdev, 0);
if (kp->key_sense_irq < 0) { if (kp->key_sense_irq < 0)
dev_err(&pdev->dev, "unable to get keypad sense irq\n");
return kp->key_sense_irq; return kp->key_sense_irq;
}
kp->key_stuck_irq = platform_get_irq(pdev, 1); kp->key_stuck_irq = platform_get_irq(pdev, 1);
if (kp->key_stuck_irq < 0) { if (kp->key_stuck_irq < 0)
dev_err(&pdev->dev, "unable to get keypad stuck irq\n");
return kp->key_stuck_irq; return kp->key_stuck_irq;
}
kp->input->name = "PMIC8XXX keypad"; kp->input->name = "PMIC8XXX keypad";
kp->input->phys = "pmic8xxx_keypad/input0"; kp->input->phys = "pmic8xxx_keypad/input0";
......
...@@ -727,10 +727,8 @@ static int pxa27x_keypad_probe(struct platform_device *pdev) ...@@ -727,10 +727,8 @@ static int pxa27x_keypad_probe(struct platform_device *pdev)
return -EINVAL; return -EINVAL;
irq = platform_get_irq(pdev, 0); irq = platform_get_irq(pdev, 0);
if (irq < 0) { if (irq < 0)
dev_err(&pdev->dev, "failed to get keypad irq\n");
return -ENXIO; return -ENXIO;
}
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (res == NULL) { if (res == NULL) {
......
...@@ -89,10 +89,8 @@ static int pxa930_rotary_probe(struct platform_device *pdev) ...@@ -89,10 +89,8 @@ static int pxa930_rotary_probe(struct platform_device *pdev)
int err; int err;
irq = platform_get_irq(pdev, 0); irq = platform_get_irq(pdev, 0);
if (irq < 0) { if (irq < 0)
dev_err(&pdev->dev, "no irq for rotary controller\n");
return -ENXIO; return -ENXIO;
}
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) { if (!res) {
......
...@@ -181,10 +181,8 @@ static int sh_keysc_probe(struct platform_device *pdev) ...@@ -181,10 +181,8 @@ static int sh_keysc_probe(struct platform_device *pdev)
} }
irq = platform_get_irq(pdev, 0); irq = platform_get_irq(pdev, 0);
if (irq < 0) { if (irq < 0)
dev_err(&pdev->dev, "failed to get irq\n");
goto err0; goto err0;
}
priv = kzalloc(sizeof(*priv), GFP_KERNEL); priv = kzalloc(sizeof(*priv), GFP_KERNEL);
if (priv == NULL) { if (priv == NULL) {
......
...@@ -118,10 +118,8 @@ static int imx_snvs_pwrkey_probe(struct platform_device *pdev) ...@@ -118,10 +118,8 @@ static int imx_snvs_pwrkey_probe(struct platform_device *pdev)
pdata->wakeup = of_property_read_bool(np, "wakeup-source"); pdata->wakeup = of_property_read_bool(np, "wakeup-source");
pdata->irq = platform_get_irq(pdev, 0); pdata->irq = platform_get_irq(pdev, 0);
if (pdata->irq < 0) { if (pdata->irq < 0)
dev_err(&pdev->dev, "no irq defined in platform data\n");
return -EINVAL; return -EINVAL;
}
regmap_update_bits(pdata->snvs, SNVS_LPCR_REG, SNVS_LPCR_DEP_EN, SNVS_LPCR_DEP_EN); regmap_update_bits(pdata->snvs, SNVS_LPCR_REG, SNVS_LPCR_DEP_EN, SNVS_LPCR_DEP_EN);
......
...@@ -191,10 +191,8 @@ static int spear_kbd_probe(struct platform_device *pdev) ...@@ -191,10 +191,8 @@ static int spear_kbd_probe(struct platform_device *pdev)
int error; int error;
irq = platform_get_irq(pdev, 0); irq = platform_get_irq(pdev, 0);
if (irq < 0) { if (irq < 0)
dev_err(&pdev->dev, "not able to get irq for the device\n");
return irq; return irq;
}
kbd = devm_kzalloc(&pdev->dev, sizeof(*kbd), GFP_KERNEL); kbd = devm_kzalloc(&pdev->dev, sizeof(*kbd), GFP_KERNEL);
if (!kbd) { if (!kbd) {
......
...@@ -187,10 +187,8 @@ static int keyscan_probe(struct platform_device *pdev) ...@@ -187,10 +187,8 @@ static int keyscan_probe(struct platform_device *pdev)
keyscan_stop(keypad_data); keyscan_stop(keypad_data);
keypad_data->irq = platform_get_irq(pdev, 0); keypad_data->irq = platform_get_irq(pdev, 0);
if (keypad_data->irq < 0) { if (keypad_data->irq < 0)
dev_err(&pdev->dev, "no IRQ specified\n");
return -EINVAL; return -EINVAL;
}
error = devm_request_irq(&pdev->dev, keypad_data->irq, keyscan_isr, 0, error = devm_request_irq(&pdev->dev, keypad_data->irq, keyscan_isr, 0,
pdev->name, keypad_data); pdev->name, keypad_data);
......
...@@ -631,10 +631,8 @@ static int tegra_kbc_probe(struct platform_device *pdev) ...@@ -631,10 +631,8 @@ static int tegra_kbc_probe(struct platform_device *pdev)
return -EINVAL; return -EINVAL;
kbc->irq = platform_get_irq(pdev, 0); kbc->irq = platform_get_irq(pdev, 0);
if (kbc->irq < 0) { if (kbc->irq < 0)
dev_err(&pdev->dev, "failed to get keyboard IRQ\n");
return -ENXIO; return -ENXIO;
}
kbc->idev = devm_input_allocate_device(&pdev->dev); kbc->idev = devm_input_allocate_device(&pdev->dev);
if (!kbc->idev) { if (!kbc->idev) {
......
...@@ -77,7 +77,6 @@ static int pm80x_onkey_probe(struct platform_device *pdev) ...@@ -77,7 +77,6 @@ static int pm80x_onkey_probe(struct platform_device *pdev)
info->irq = platform_get_irq(pdev, 0); info->irq = platform_get_irq(pdev, 0);
if (info->irq < 0) { if (info->irq < 0) {
dev_err(&pdev->dev, "No IRQ resource!\n");
err = -EINVAL; err = -EINVAL;
goto out; goto out;
} }
......
...@@ -64,10 +64,8 @@ static int pm860x_onkey_probe(struct platform_device *pdev) ...@@ -64,10 +64,8 @@ static int pm860x_onkey_probe(struct platform_device *pdev)
int irq, ret; int irq, ret;
irq = platform_get_irq(pdev, 0); irq = platform_get_irq(pdev, 0);
if (irq < 0) { if (irq < 0)
dev_err(&pdev->dev, "No IRQ resource!\n");
return -EINVAL; return -EINVAL;
}
info = devm_kzalloc(&pdev->dev, sizeof(struct pm860x_onkey_info), info = devm_kzalloc(&pdev->dev, sizeof(struct pm860x_onkey_info),
GFP_KERNEL); GFP_KERNEL);
......
...@@ -55,16 +55,12 @@ static int ab8500_ponkey_probe(struct platform_device *pdev) ...@@ -55,16 +55,12 @@ static int ab8500_ponkey_probe(struct platform_device *pdev)
int error; int error;
irq_dbf = platform_get_irq_byname(pdev, "ONKEY_DBF"); irq_dbf = platform_get_irq_byname(pdev, "ONKEY_DBF");
if (irq_dbf < 0) { if (irq_dbf < 0)
dev_err(&pdev->dev, "No IRQ for ONKEY_DBF, error=%d\n", irq_dbf);
return irq_dbf; return irq_dbf;
}
irq_dbr = platform_get_irq_byname(pdev, "ONKEY_DBR"); irq_dbr = platform_get_irq_byname(pdev, "ONKEY_DBR");
if (irq_dbr < 0) { if (irq_dbr < 0)
dev_err(&pdev->dev, "No IRQ for ONKEY_DBR, error=%d\n", irq_dbr);
return irq_dbr; return irq_dbr;
}
ponkey = devm_kzalloc(&pdev->dev, sizeof(struct ab8500_ponkey), ponkey = devm_kzalloc(&pdev->dev, sizeof(struct ab8500_ponkey),
GFP_KERNEL); GFP_KERNEL);
......
...@@ -229,20 +229,14 @@ static int axp20x_pek_probe_input_device(struct axp20x_pek *axp20x_pek, ...@@ -229,20 +229,14 @@ static int axp20x_pek_probe_input_device(struct axp20x_pek *axp20x_pek,
int error; int error;
axp20x_pek->irq_dbr = platform_get_irq_byname(pdev, "PEK_DBR"); axp20x_pek->irq_dbr = platform_get_irq_byname(pdev, "PEK_DBR");
if (axp20x_pek->irq_dbr < 0) { if (axp20x_pek->irq_dbr < 0)
dev_err(&pdev->dev, "No IRQ for PEK_DBR, error=%d\n",
axp20x_pek->irq_dbr);
return axp20x_pek->irq_dbr; return axp20x_pek->irq_dbr;
}
axp20x_pek->irq_dbr = regmap_irq_get_virq(axp20x->regmap_irqc, axp20x_pek->irq_dbr = regmap_irq_get_virq(axp20x->regmap_irqc,
axp20x_pek->irq_dbr); axp20x_pek->irq_dbr);
axp20x_pek->irq_dbf = platform_get_irq_byname(pdev, "PEK_DBF"); axp20x_pek->irq_dbf = platform_get_irq_byname(pdev, "PEK_DBF");
if (axp20x_pek->irq_dbf < 0) { if (axp20x_pek->irq_dbf < 0)
dev_err(&pdev->dev, "No IRQ for PEK_DBF, error=%d\n",
axp20x_pek->irq_dbf);
return axp20x_pek->irq_dbf; return axp20x_pek->irq_dbf;
}
axp20x_pek->irq_dbf = regmap_irq_get_virq(axp20x->regmap_irqc, axp20x_pek->irq_dbf = regmap_irq_get_virq(axp20x->regmap_irqc,
axp20x_pek->irq_dbf); axp20x_pek->irq_dbf);
......
...@@ -76,11 +76,8 @@ static int da9055_onkey_probe(struct platform_device *pdev) ...@@ -76,11 +76,8 @@ static int da9055_onkey_probe(struct platform_device *pdev)
int irq, err; int irq, err;
irq = platform_get_irq_byname(pdev, "ONKEY"); irq = platform_get_irq_byname(pdev, "ONKEY");
if (irq < 0) { if (irq < 0)
dev_err(&pdev->dev,
"Failed to get an IRQ for input device, %d\n", irq);
return -EINVAL; return -EINVAL;
}
onkey = devm_kzalloc(&pdev->dev, sizeof(*onkey), GFP_KERNEL); onkey = devm_kzalloc(&pdev->dev, sizeof(*onkey), GFP_KERNEL);
if (!onkey) { if (!onkey) {
......
...@@ -248,11 +248,8 @@ static int da9063_onkey_probe(struct platform_device *pdev) ...@@ -248,11 +248,8 @@ static int da9063_onkey_probe(struct platform_device *pdev)
} }
irq = platform_get_irq_byname(pdev, "ONKEY"); irq = platform_get_irq_byname(pdev, "ONKEY");
if (irq < 0) { if (irq < 0)
error = irq; return irq;
dev_err(&pdev->dev, "Failed to get platform IRQ: %d\n", error);
return error;
}
error = devm_request_threaded_irq(&pdev->dev, irq, error = devm_request_threaded_irq(&pdev->dev, irq,
NULL, da9063_onkey_irq_handler, NULL, da9063_onkey_irq_handler,
......
...@@ -65,18 +65,12 @@ static int e3x0_button_probe(struct platform_device *pdev) ...@@ -65,18 +65,12 @@ static int e3x0_button_probe(struct platform_device *pdev)
int error; int error;
irq_press = platform_get_irq_byname(pdev, "press"); irq_press = platform_get_irq_byname(pdev, "press");
if (irq_press < 0) { if (irq_press < 0)
dev_err(&pdev->dev, "No IRQ for 'press', error=%d\n",
irq_press);
return irq_press; return irq_press;
}
irq_release = platform_get_irq_byname(pdev, "release"); irq_release = platform_get_irq_byname(pdev, "release");
if (irq_release < 0) { if (irq_release < 0)
dev_err(&pdev->dev, "No IRQ for 'release', error=%d\n",
irq_release);
return irq_release; return irq_release;
}
input = devm_input_allocate_device(&pdev->dev); input = devm_input_allocate_device(&pdev->dev);
if (!input) if (!input)
......
...@@ -90,12 +90,8 @@ static int hi65xx_powerkey_probe(struct platform_device *pdev) ...@@ -90,12 +90,8 @@ static int hi65xx_powerkey_probe(struct platform_device *pdev)
for (i = 0; i < ARRAY_SIZE(hi65xx_irq_info); i++) { for (i = 0; i < ARRAY_SIZE(hi65xx_irq_info); i++) {
irq = platform_get_irq_byname(pdev, hi65xx_irq_info[i].name); irq = platform_get_irq_byname(pdev, hi65xx_irq_info[i].name);
if (irq < 0) { if (irq < 0)
error = irq; return irq;
dev_err(dev, "couldn't get irq %s: %d\n",
hi65xx_irq_info[i].name, error);
return error;
}
error = devm_request_any_context_irq(dev, irq, error = devm_request_any_context_irq(dev, irq,
hi65xx_irq_info[i].handler, hi65xx_irq_info[i].handler,
......
...@@ -71,16 +71,12 @@ static int max8925_onkey_probe(struct platform_device *pdev) ...@@ -71,16 +71,12 @@ static int max8925_onkey_probe(struct platform_device *pdev)
int irq[2], error; int irq[2], error;
irq[0] = platform_get_irq(pdev, 0); irq[0] = platform_get_irq(pdev, 0);
if (irq[0] < 0) { if (irq[0] < 0)
dev_err(&pdev->dev, "No IRQ resource!\n");
return -EINVAL; return -EINVAL;
}
irq[1] = platform_get_irq(pdev, 1); irq[1] = platform_get_irq(pdev, 1);
if (irq[1] < 0) { if (irq[1] < 0)
dev_err(&pdev->dev, "No IRQ resource!\n");
return -EINVAL; return -EINVAL;
}
info = devm_kzalloc(&pdev->dev, sizeof(struct max8925_onkey_info), info = devm_kzalloc(&pdev->dev, sizeof(struct max8925_onkey_info),
GFP_KERNEL); GFP_KERNEL);
......
...@@ -205,10 +205,8 @@ static int pm8941_pwrkey_probe(struct platform_device *pdev) ...@@ -205,10 +205,8 @@ static int pm8941_pwrkey_probe(struct platform_device *pdev)
return error; return error;
pwrkey->irq = platform_get_irq(pdev, 0); pwrkey->irq = platform_get_irq(pdev, 0);
if (pwrkey->irq < 0) { if (pwrkey->irq < 0)
dev_err(&pdev->dev, "failed to get irq\n");
return pwrkey->irq; return pwrkey->irq;
}
error = regmap_read(pwrkey->regmap, pwrkey->baseaddr + PON_REV2, error = regmap_read(pwrkey->regmap, pwrkey->baseaddr + PON_REV2,
&pwrkey->revision); &pwrkey->revision);
......
...@@ -53,16 +53,12 @@ static int rk805_pwrkey_probe(struct platform_device *pdev) ...@@ -53,16 +53,12 @@ static int rk805_pwrkey_probe(struct platform_device *pdev)
input_set_capability(pwr, EV_KEY, KEY_POWER); input_set_capability(pwr, EV_KEY, KEY_POWER);
fall_irq = platform_get_irq(pdev, 0); fall_irq = platform_get_irq(pdev, 0);
if (fall_irq < 0) { if (fall_irq < 0)
dev_err(&pdev->dev, "Can't get fall irq: %d\n", fall_irq);
return fall_irq; return fall_irq;
}
rise_irq = platform_get_irq(pdev, 1); rise_irq = platform_get_irq(pdev, 1);
if (rise_irq < 0) { if (rise_irq < 0)
dev_err(&pdev->dev, "Can't get rise irq: %d\n", rise_irq);
return rise_irq; return rise_irq;
}
err = devm_request_any_context_irq(&pwr->dev, fall_irq, err = devm_request_any_context_irq(&pwr->dev, fall_irq,
pwrkey_fall_irq, pwrkey_fall_irq,
......
...@@ -61,18 +61,12 @@ static int stpmic1_onkey_probe(struct platform_device *pdev) ...@@ -61,18 +61,12 @@ static int stpmic1_onkey_probe(struct platform_device *pdev)
return -ENOMEM; return -ENOMEM;
onkey->irq_falling = platform_get_irq_byname(pdev, "onkey-falling"); onkey->irq_falling = platform_get_irq_byname(pdev, "onkey-falling");
if (onkey->irq_falling < 0) { if (onkey->irq_falling < 0)
dev_err(dev, "failed: request IRQ onkey-falling %d\n",
onkey->irq_falling);
return onkey->irq_falling; return onkey->irq_falling;
}
onkey->irq_rising = platform_get_irq_byname(pdev, "onkey-rising"); onkey->irq_rising = platform_get_irq_byname(pdev, "onkey-rising");
if (onkey->irq_rising < 0) { if (onkey->irq_rising < 0)
dev_err(dev, "failed: request IRQ onkey-rising %d\n",
onkey->irq_rising);
return onkey->irq_rising; return onkey->irq_rising;
}
if (!device_property_read_u32(dev, "power-off-time-sec", &val)) { if (!device_property_read_u32(dev, "power-off-time-sec", &val)) {
if (val > 0 && val <= 16) { if (val > 0 && val <= 16) {
......
...@@ -124,10 +124,8 @@ static int tps6521x_pb_probe(struct platform_device *pdev) ...@@ -124,10 +124,8 @@ static int tps6521x_pb_probe(struct platform_device *pdev)
device_init_wakeup(dev, true); device_init_wakeup(dev, true);
irq = platform_get_irq(pdev, 0); irq = platform_get_irq(pdev, 0);
if (irq < 0) { if (irq < 0)
dev_err(dev, "No IRQ resource!\n");
return -EINVAL; return -EINVAL;
}
error = devm_request_threaded_irq(dev, irq, NULL, tps6521x_pb_irq, error = devm_request_threaded_irq(dev, irq, NULL, tps6521x_pb_irq,
IRQF_TRIGGER_RISING | IRQF_TRIGGER_RISING |
......
...@@ -272,10 +272,8 @@ static int twl6040_vibra_probe(struct platform_device *pdev) ...@@ -272,10 +272,8 @@ static int twl6040_vibra_probe(struct platform_device *pdev)
} }
info->irq = platform_get_irq(pdev, 0); info->irq = platform_get_irq(pdev, 0);
if (info->irq < 0) { if (info->irq < 0)
dev_err(info->dev, "invalid irq\n");
return -EINVAL; return -EINVAL;
}
error = devm_request_threaded_irq(&pdev->dev, info->irq, NULL, error = devm_request_threaded_irq(&pdev->dev, info->irq, NULL,
twl6040_vib_irq_handler, twl6040_vib_irq_handler,
......
...@@ -147,10 +147,8 @@ static int pxa930_trkball_probe(struct platform_device *pdev) ...@@ -147,10 +147,8 @@ static int pxa930_trkball_probe(struct platform_device *pdev)
int irq, error; int irq, error;
irq = platform_get_irq(pdev, 0); irq = platform_get_irq(pdev, 0);
if (irq < 0) { if (irq < 0)
dev_err(&pdev->dev, "failed to get trkball irq\n");
return -ENXIO; return -ENXIO;
}
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) { if (!res) {
......
...@@ -187,10 +187,8 @@ static int arc_ps2_probe(struct platform_device *pdev) ...@@ -187,10 +187,8 @@ static int arc_ps2_probe(struct platform_device *pdev)
int error, id, i; int error, id, i;
irq = platform_get_irq_byname(pdev, "arc_ps2_irq"); irq = platform_get_irq_byname(pdev, "arc_ps2_irq");
if (irq < 0) { if (irq < 0)
dev_err(&pdev->dev, "no IRQ defined\n");
return -EINVAL; return -EINVAL;
}
arc_ps2 = devm_kzalloc(&pdev->dev, sizeof(struct arc_ps2_data), arc_ps2 = devm_kzalloc(&pdev->dev, sizeof(struct arc_ps2_data),
GFP_KERNEL); GFP_KERNEL);
......
...@@ -369,8 +369,6 @@ static int ps2_gpio_probe(struct platform_device *pdev) ...@@ -369,8 +369,6 @@ static int ps2_gpio_probe(struct platform_device *pdev)
drvdata->irq = platform_get_irq(pdev, 0); drvdata->irq = platform_get_irq(pdev, 0);
if (drvdata->irq < 0) { if (drvdata->irq < 0) {
dev_err(dev, "failed to get irq from platform resource: %d\n",
drvdata->irq);
error = drvdata->irq; error = drvdata->irq;
goto err_free_serio; goto err_free_serio;
} }
......
...@@ -185,10 +185,8 @@ static int pm860x_touch_probe(struct platform_device *pdev) ...@@ -185,10 +185,8 @@ static int pm860x_touch_probe(struct platform_device *pdev)
int irq, ret, res_x = 0, data = 0; int irq, ret, res_x = 0, data = 0;
irq = platform_get_irq(pdev, 0); irq = platform_get_irq(pdev, 0);
if (irq < 0) { if (irq < 0)
dev_err(&pdev->dev, "No IRQ resource!\n");
return -EINVAL; return -EINVAL;
}
if (pm860x_touch_dt_init(pdev, chip, &res_x)) { if (pm860x_touch_dt_init(pdev, chip, &res_x)) {
if (pdata) { if (pdata) {
......
...@@ -489,10 +489,8 @@ static int iproc_ts_probe(struct platform_device *pdev) ...@@ -489,10 +489,8 @@ static int iproc_ts_probe(struct platform_device *pdev)
/* get interrupt */ /* get interrupt */
irq = platform_get_irq(pdev, 0); irq = platform_get_irq(pdev, 0);
if (irq < 0) { if (irq < 0)
dev_err(&pdev->dev, "platform_get_irq failed: %d\n", irq);
return irq; return irq;
}
error = devm_request_irq(&pdev->dev, irq, error = devm_request_irq(&pdev->dev, irq,
iproc_touchscreen_interrupt, iproc_touchscreen_interrupt,
......
...@@ -526,10 +526,8 @@ static int mx25_tcq_probe(struct platform_device *pdev) ...@@ -526,10 +526,8 @@ static int mx25_tcq_probe(struct platform_device *pdev)
} }
priv->irq = platform_get_irq(pdev, 0); priv->irq = platform_get_irq(pdev, 0);
if (priv->irq <= 0) { if (priv->irq <= 0)
dev_err(dev, "Failed to get IRQ\n");
return priv->irq; return priv->irq;
}
idev = devm_input_allocate_device(dev); idev = devm_input_allocate_device(dev);
if (!idev) { if (!idev) {
......
...@@ -430,16 +430,12 @@ static int imx6ul_tsc_probe(struct platform_device *pdev) ...@@ -430,16 +430,12 @@ static int imx6ul_tsc_probe(struct platform_device *pdev)
} }
tsc_irq = platform_get_irq(pdev, 0); tsc_irq = platform_get_irq(pdev, 0);
if (tsc_irq < 0) { if (tsc_irq < 0)
dev_err(&pdev->dev, "no tsc irq resource?\n");
return tsc_irq; return tsc_irq;
}
adc_irq = platform_get_irq(pdev, 1); adc_irq = platform_get_irq(pdev, 1);
if (adc_irq < 0) { if (adc_irq < 0)
dev_err(&pdev->dev, "no adc irq resource?\n");
return adc_irq; return adc_irq;
}
err = devm_request_threaded_irq(tsc->dev, tsc_irq, err = devm_request_threaded_irq(tsc->dev, tsc_irq,
NULL, tsc_irq_fn, IRQF_ONESHOT, NULL, tsc_irq_fn, IRQF_ONESHOT,
......
...@@ -212,10 +212,8 @@ static int lpc32xx_ts_probe(struct platform_device *pdev) ...@@ -212,10 +212,8 @@ static int lpc32xx_ts_probe(struct platform_device *pdev)
} }
irq = platform_get_irq(pdev, 0); irq = platform_get_irq(pdev, 0);
if (irq < 0) { if (irq < 0)
dev_err(&pdev->dev, "Can't get interrupt resource\n");
return irq; return irq;
}
tsc = kzalloc(sizeof(*tsc), GFP_KERNEL); tsc = kzalloc(sizeof(*tsc), GFP_KERNEL);
input = input_allocate_device(); input = input_allocate_device();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment