mfd: 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: Lee Jones <lee.jones@linaro.org>
This commit is contained in:
parent
b620c17672
commit
802d9bd4fa
|
@ -2680,16 +2680,12 @@ static int ab8500_debug_probe(struct platform_device *plf)
|
||||||
irq_ab8500 = res->start;
|
irq_ab8500 = res->start;
|
||||||
|
|
||||||
irq_first = platform_get_irq_byname(plf, "IRQ_FIRST");
|
irq_first = platform_get_irq_byname(plf, "IRQ_FIRST");
|
||||||
if (irq_first < 0) {
|
if (irq_first < 0)
|
||||||
dev_err(&plf->dev, "First irq not found, err %d\n", irq_first);
|
|
||||||
return irq_first;
|
return irq_first;
|
||||||
}
|
|
||||||
|
|
||||||
irq_last = platform_get_irq_byname(plf, "IRQ_LAST");
|
irq_last = platform_get_irq_byname(plf, "IRQ_LAST");
|
||||||
if (irq_last < 0) {
|
if (irq_last < 0)
|
||||||
dev_err(&plf->dev, "Last irq not found, err %d\n", irq_last);
|
|
||||||
return irq_last;
|
return irq_last;
|
||||||
}
|
|
||||||
|
|
||||||
ab8500_dir = debugfs_create_dir(AB8500_NAME_STRING, NULL);
|
ab8500_dir = debugfs_create_dir(AB8500_NAME_STRING, NULL);
|
||||||
|
|
||||||
|
|
|
@ -3130,10 +3130,8 @@ static int db8500_prcmu_probe(struct platform_device *pdev)
|
||||||
writel(ALL_MBOX_BITS, PRCM_ARM_IT1_CLR);
|
writel(ALL_MBOX_BITS, PRCM_ARM_IT1_CLR);
|
||||||
|
|
||||||
irq = platform_get_irq(pdev, 0);
|
irq = platform_get_irq(pdev, 0);
|
||||||
if (irq <= 0) {
|
if (irq <= 0)
|
||||||
dev_err(&pdev->dev, "no prcmu irq provided\n");
|
|
||||||
return irq;
|
return irq;
|
||||||
}
|
|
||||||
|
|
||||||
err = request_threaded_irq(irq, prcmu_irq_handler,
|
err = request_threaded_irq(irq, prcmu_irq_handler,
|
||||||
prcmu_irq_thread_fn, IRQF_NO_SUSPEND, "prcmu", NULL);
|
prcmu_irq_thread_fn, IRQF_NO_SUSPEND, "prcmu", NULL);
|
||||||
|
|
|
@ -69,10 +69,8 @@ static int mx25_tsadc_setup_irq(struct platform_device *pdev,
|
||||||
int irq;
|
int irq;
|
||||||
|
|
||||||
irq = platform_get_irq(pdev, 0);
|
irq = platform_get_irq(pdev, 0);
|
||||||
if (irq <= 0) {
|
if (irq <= 0)
|
||||||
dev_err(dev, "Failed to get irq\n");
|
|
||||||
return irq;
|
return irq;
|
||||||
}
|
|
||||||
|
|
||||||
tsadc->domain = irq_domain_add_simple(np, 2, 0, &mx25_tsadc_domain_ops,
|
tsadc->domain = irq_domain_add_simple(np, 2, 0, &mx25_tsadc_domain_ops,
|
||||||
tsadc);
|
tsadc);
|
||||||
|
|
|
@ -450,10 +450,8 @@ static int bxtwc_probe(struct platform_device *pdev)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
ret = platform_get_irq(pdev, 0);
|
ret = platform_get_irq(pdev, 0);
|
||||||
if (ret < 0) {
|
if (ret < 0)
|
||||||
dev_err(&pdev->dev, "Invalid IRQ\n");
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
|
||||||
pmic->irq = ret;
|
pmic->irq = ret;
|
||||||
|
|
||||||
dev_set_drvdata(&pdev->dev, pmic);
|
dev_set_drvdata(&pdev->dev, pmic);
|
||||||
|
|
|
@ -561,22 +561,16 @@ static int qcom_rpm_probe(struct platform_device *pdev)
|
||||||
clk_prepare_enable(rpm->ramclk); /* Accepts NULL */
|
clk_prepare_enable(rpm->ramclk); /* Accepts NULL */
|
||||||
|
|
||||||
irq_ack = platform_get_irq_byname(pdev, "ack");
|
irq_ack = platform_get_irq_byname(pdev, "ack");
|
||||||
if (irq_ack < 0) {
|
if (irq_ack < 0)
|
||||||
dev_err(&pdev->dev, "required ack interrupt missing\n");
|
|
||||||
return irq_ack;
|
return irq_ack;
|
||||||
}
|
|
||||||
|
|
||||||
irq_err = platform_get_irq_byname(pdev, "err");
|
irq_err = platform_get_irq_byname(pdev, "err");
|
||||||
if (irq_err < 0) {
|
if (irq_err < 0)
|
||||||
dev_err(&pdev->dev, "required err interrupt missing\n");
|
|
||||||
return irq_err;
|
return irq_err;
|
||||||
}
|
|
||||||
|
|
||||||
irq_wakeup = platform_get_irq_byname(pdev, "wakeup");
|
irq_wakeup = platform_get_irq_byname(pdev, "wakeup");
|
||||||
if (irq_wakeup < 0) {
|
if (irq_wakeup < 0)
|
||||||
dev_err(&pdev->dev, "required wakeup interrupt missing\n");
|
|
||||||
return irq_wakeup;
|
return irq_wakeup;
|
||||||
}
|
|
||||||
|
|
||||||
match = of_match_device(qcom_rpm_of_match, &pdev->dev);
|
match = of_match_device(qcom_rpm_of_match, &pdev->dev);
|
||||||
if (!match)
|
if (!match)
|
||||||
|
|
|
@ -1394,10 +1394,8 @@ static int sm501_plat_probe(struct platform_device *dev)
|
||||||
sm->platdata = dev_get_platdata(&dev->dev);
|
sm->platdata = dev_get_platdata(&dev->dev);
|
||||||
|
|
||||||
ret = platform_get_irq(dev, 0);
|
ret = platform_get_irq(dev, 0);
|
||||||
if (ret < 0) {
|
if (ret < 0)
|
||||||
dev_err(&dev->dev, "failed to get irq resource\n");
|
|
||||||
goto err_res;
|
goto err_res;
|
||||||
}
|
|
||||||
sm->irq = ret;
|
sm->irq = ret;
|
||||||
|
|
||||||
sm->io_res = platform_get_resource(dev, IORESOURCE_MEM, 1);
|
sm->io_res = platform_get_resource(dev, IORESOURCE_MEM, 1);
|
||||||
|
|
Loading…
Reference in New Issue