aboutsummaryrefslogtreecommitdiff
path: root/drivers/input/touchscreen
diff options
context:
space:
mode:
authorStephen Boyd <swboyd@chromium.org>2019-08-14 10:46:38 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2019-08-14 10:49:01 -0700
commit0bec8b7e5ca1a629f26173691526432f9d7cf8c1 (patch)
tree8b002ce844e53e1de228c0c581553473e948d86f /drivers/input/touchscreen
parentf5d4c647d0ddcf4ffcb9ff584fba87a976addcbd (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>
Diffstat (limited to 'drivers/input/touchscreen')
-rw-r--r--drivers/input/touchscreen/88pm860x-ts.c4
-rw-r--r--drivers/input/touchscreen/bcm_iproc_tsc.c4
-rw-r--r--drivers/input/touchscreen/fsl-imx25-tcq.c4
-rw-r--r--drivers/input/touchscreen/imx6ul_tsc.c8
-rw-r--r--drivers/input/touchscreen/lpc32xx_ts.c4
5 files changed, 6 insertions, 18 deletions
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)
int irq, ret, res_x = 0, data = 0;
irq = platform_get_irq(pdev, 0);
- if (irq < 0) {
- dev_err(&pdev->dev, "No IRQ resource!\n");
+ if (irq < 0)
return -EINVAL;
- }
if (pm860x_touch_dt_init(pdev, chip, &res_x)) {
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)
/* get interrupt */
irq = platform_get_irq(pdev, 0);
- if (irq < 0) {
- dev_err(&pdev->dev, "platform_get_irq failed: %d\n", irq);
+ if (irq < 0)
return irq;
- }
error = devm_request_irq(&pdev->dev, irq,
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)
}
priv->irq = platform_get_irq(pdev, 0);
- if (priv->irq <= 0) {
- dev_err(dev, "Failed to get IRQ\n");
+ if (priv->irq <= 0)
return priv->irq;
- }
idev = devm_input_allocate_device(dev);
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)
}
tsc_irq = platform_get_irq(pdev, 0);
- if (tsc_irq < 0) {
- dev_err(&pdev->dev, "no tsc irq resource?\n");
+ if (tsc_irq < 0)
return tsc_irq;
- }
adc_irq = platform_get_irq(pdev, 1);
- if (adc_irq < 0) {
- dev_err(&pdev->dev, "no adc irq resource?\n");
+ if (adc_irq < 0)
return adc_irq;
- }
err = devm_request_threaded_irq(tsc->dev, tsc_irq,
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)
}
irq = platform_get_irq(pdev, 0);
- if (irq < 0) {
- dev_err(&pdev->dev, "Can't get interrupt resource\n");
+ if (irq < 0)
return irq;
- }
tsc = kzalloc(sizeof(*tsc), GFP_KERNEL);
input = input_allocate_device();