diff options
author | Stephen Boyd <swboyd@chromium.org> | 2019-07-30 14:15:39 -0400 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2019-08-13 04:53:10 -0400 |
commit | faac910201e9beb66530bd8c3fe8a02d907ee2a9 (patch) | |
tree | d6c6658682a9c1514e18e3295e9f4d9539f14ada | |
parent | b0a3fa44659ccee87215600b4235982bc0f3e828 (diff) |
rtc: 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).
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: linux-rtc@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Link: https://lore.kernel.org/r/20190730181557.90391-40-swboyd@chromium.org
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-rw-r--r-- | drivers/rtc/rtc-88pm80x.c | 1 | ||||
-rw-r--r-- | drivers/rtc/rtc-88pm860x.c | 4 | ||||
-rw-r--r-- | drivers/rtc/rtc-ac100.c | 4 | ||||
-rw-r--r-- | drivers/rtc/rtc-armada38x.c | 5 | ||||
-rw-r--r-- | drivers/rtc/rtc-asm9260.c | 4 | ||||
-rw-r--r-- | drivers/rtc/rtc-at91rm9200.c | 4 | ||||
-rw-r--r-- | drivers/rtc/rtc-at91sam9.c | 4 | ||||
-rw-r--r-- | drivers/rtc/rtc-bd70528.c | 5 | ||||
-rw-r--r-- | drivers/rtc/rtc-davinci.c | 4 | ||||
-rw-r--r-- | drivers/rtc/rtc-jz4740.c | 4 | ||||
-rw-r--r-- | drivers/rtc/rtc-max77686.c | 5 | ||||
-rw-r--r-- | drivers/rtc/rtc-mt7622.c | 1 | ||||
-rw-r--r-- | drivers/rtc/rtc-pic32.c | 4 | ||||
-rw-r--r-- | drivers/rtc/rtc-pm8xxx.c | 4 | ||||
-rw-r--r-- | drivers/rtc/rtc-puv3.c | 8 | ||||
-rw-r--r-- | drivers/rtc/rtc-pxa.c | 8 | ||||
-rw-r--r-- | drivers/rtc/rtc-rk808.c | 6 | ||||
-rw-r--r-- | drivers/rtc/rtc-s3c.c | 8 | ||||
-rw-r--r-- | drivers/rtc/rtc-sc27xx.c | 4 | ||||
-rw-r--r-- | drivers/rtc/rtc-spear.c | 4 | ||||
-rw-r--r-- | drivers/rtc/rtc-stm32.c | 1 | ||||
-rw-r--r-- | drivers/rtc/rtc-sun6i.c | 4 | ||||
-rw-r--r-- | drivers/rtc/rtc-sunxi.c | 4 | ||||
-rw-r--r-- | drivers/rtc/rtc-tegra.c | 4 | ||||
-rw-r--r-- | drivers/rtc/rtc-vt8500.c | 4 | ||||
-rw-r--r-- | drivers/rtc/rtc-xgene.c | 4 | ||||
-rw-r--r-- | drivers/rtc/rtc-zynqmp.c | 8 |
27 files changed, 28 insertions, 92 deletions
diff --git a/drivers/rtc/rtc-88pm80x.c b/drivers/rtc/rtc-88pm80x.c index e4d5a19fd1c9..9aa4a59dbf47 100644 --- a/drivers/rtc/rtc-88pm80x.c +++ b/drivers/rtc/rtc-88pm80x.c | |||
@@ -264,7 +264,6 @@ static int pm80x_rtc_probe(struct platform_device *pdev) | |||
264 | return -ENOMEM; | 264 | return -ENOMEM; |
265 | info->irq = platform_get_irq(pdev, 0); | 265 | info->irq = platform_get_irq(pdev, 0); |
266 | if (info->irq < 0) { | 266 | if (info->irq < 0) { |
267 | dev_err(&pdev->dev, "No IRQ resource!\n"); | ||
268 | ret = -EINVAL; | 267 | ret = -EINVAL; |
269 | goto out; | 268 | goto out; |
270 | } | 269 | } |
diff --git a/drivers/rtc/rtc-88pm860x.c b/drivers/rtc/rtc-88pm860x.c index 434285f495e0..4743b16a8d84 100644 --- a/drivers/rtc/rtc-88pm860x.c +++ b/drivers/rtc/rtc-88pm860x.c | |||
@@ -328,10 +328,8 @@ static int pm860x_rtc_probe(struct platform_device *pdev) | |||
328 | if (!info) | 328 | if (!info) |
329 | return -ENOMEM; | 329 | return -ENOMEM; |
330 | info->irq = platform_get_irq(pdev, 0); | 330 | info->irq = platform_get_irq(pdev, 0); |
331 | if (info->irq < 0) { | 331 | if (info->irq < 0) |
332 | dev_err(&pdev->dev, "No IRQ resource!\n"); | ||
333 | return info->irq; | 332 | return info->irq; |
334 | } | ||
335 | 333 | ||
336 | info->chip = chip; | 334 | info->chip = chip; |
337 | info->i2c = (chip->id == CHIP_PM8607) ? chip->client : chip->companion; | 335 | info->i2c = (chip->id == CHIP_PM8607) ? chip->client : chip->companion; |
diff --git a/drivers/rtc/rtc-ac100.c b/drivers/rtc/rtc-ac100.c index 2e5a8b15b222..a4dcf2950396 100644 --- a/drivers/rtc/rtc-ac100.c +++ b/drivers/rtc/rtc-ac100.c | |||
@@ -578,10 +578,8 @@ static int ac100_rtc_probe(struct platform_device *pdev) | |||
578 | chip->regmap = ac100->regmap; | 578 | chip->regmap = ac100->regmap; |
579 | 579 | ||
580 | chip->irq = platform_get_irq(pdev, 0); | 580 | chip->irq = platform_get_irq(pdev, 0); |
581 | if (chip->irq < 0) { | 581 | if (chip->irq < 0) |
582 | dev_err(&pdev->dev, "No IRQ resource\n"); | ||
583 | return chip->irq; | 582 | return chip->irq; |
584 | } | ||
585 | 583 | ||
586 | chip->rtc = devm_rtc_allocate_device(&pdev->dev); | 584 | chip->rtc = devm_rtc_allocate_device(&pdev->dev); |
587 | if (IS_ERR(chip->rtc)) | 585 | if (IS_ERR(chip->rtc)) |
diff --git a/drivers/rtc/rtc-armada38x.c b/drivers/rtc/rtc-armada38x.c index 19d6980e90fb..8e8b8079b60a 100644 --- a/drivers/rtc/rtc-armada38x.c +++ b/drivers/rtc/rtc-armada38x.c | |||
@@ -530,11 +530,8 @@ static __init int armada38x_rtc_probe(struct platform_device *pdev) | |||
530 | return PTR_ERR(rtc->regs_soc); | 530 | return PTR_ERR(rtc->regs_soc); |
531 | 531 | ||
532 | rtc->irq = platform_get_irq(pdev, 0); | 532 | rtc->irq = platform_get_irq(pdev, 0); |
533 | 533 | if (rtc->irq < 0) | |
534 | if (rtc->irq < 0) { | ||
535 | dev_err(&pdev->dev, "no irq\n"); | ||
536 | return rtc->irq; | 534 | return rtc->irq; |
537 | } | ||
538 | 535 | ||
539 | rtc->rtc_dev = devm_rtc_allocate_device(&pdev->dev); | 536 | rtc->rtc_dev = devm_rtc_allocate_device(&pdev->dev); |
540 | if (IS_ERR(rtc->rtc_dev)) | 537 | if (IS_ERR(rtc->rtc_dev)) |
diff --git a/drivers/rtc/rtc-asm9260.c b/drivers/rtc/rtc-asm9260.c index d45a44936308..10413d803caa 100644 --- a/drivers/rtc/rtc-asm9260.c +++ b/drivers/rtc/rtc-asm9260.c | |||
@@ -257,10 +257,8 @@ static int asm9260_rtc_probe(struct platform_device *pdev) | |||
257 | platform_set_drvdata(pdev, priv); | 257 | platform_set_drvdata(pdev, priv); |
258 | 258 | ||
259 | irq_alarm = platform_get_irq(pdev, 0); | 259 | irq_alarm = platform_get_irq(pdev, 0); |
260 | if (irq_alarm < 0) { | 260 | if (irq_alarm < 0) |
261 | dev_err(dev, "No alarm IRQ resource defined\n"); | ||
262 | return irq_alarm; | 261 | return irq_alarm; |
263 | } | ||
264 | 262 | ||
265 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 263 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
266 | priv->iobase = devm_ioremap_resource(dev, res); | 264 | priv->iobase = devm_ioremap_resource(dev, res); |
diff --git a/drivers/rtc/rtc-at91rm9200.c b/drivers/rtc/rtc-at91rm9200.c index 82a54e93ff04..d119c6e6353e 100644 --- a/drivers/rtc/rtc-at91rm9200.c +++ b/drivers/rtc/rtc-at91rm9200.c | |||
@@ -378,10 +378,8 @@ static int __init at91_rtc_probe(struct platform_device *pdev) | |||
378 | } | 378 | } |
379 | 379 | ||
380 | irq = platform_get_irq(pdev, 0); | 380 | irq = platform_get_irq(pdev, 0); |
381 | if (irq < 0) { | 381 | if (irq < 0) |
382 | dev_err(&pdev->dev, "no irq resource defined\n"); | ||
383 | return -ENXIO; | 382 | return -ENXIO; |
384 | } | ||
385 | 383 | ||
386 | at91_rtc_regs = devm_ioremap(&pdev->dev, regs->start, | 384 | at91_rtc_regs = devm_ioremap(&pdev->dev, regs->start, |
387 | resource_size(regs)); | 385 | resource_size(regs)); |
diff --git a/drivers/rtc/rtc-at91sam9.c b/drivers/rtc/rtc-at91sam9.c index 4daf3789b978..bb3ba7bfe6a5 100644 --- a/drivers/rtc/rtc-at91sam9.c +++ b/drivers/rtc/rtc-at91sam9.c | |||
@@ -342,10 +342,8 @@ static int at91_rtc_probe(struct platform_device *pdev) | |||
342 | struct of_phandle_args args; | 342 | struct of_phandle_args args; |
343 | 343 | ||
344 | irq = platform_get_irq(pdev, 0); | 344 | irq = platform_get_irq(pdev, 0); |
345 | if (irq < 0) { | 345 | if (irq < 0) |
346 | dev_err(&pdev->dev, "failed to get interrupt resource\n"); | ||
347 | return irq; | 346 | return irq; |
348 | } | ||
349 | 347 | ||
350 | rtc = devm_kzalloc(&pdev->dev, sizeof(*rtc), GFP_KERNEL); | 348 | rtc = devm_kzalloc(&pdev->dev, sizeof(*rtc), GFP_KERNEL); |
351 | if (!rtc) | 349 | if (!rtc) |
diff --git a/drivers/rtc/rtc-bd70528.c b/drivers/rtc/rtc-bd70528.c index f9bdd555e1a2..3e745c05bc22 100644 --- a/drivers/rtc/rtc-bd70528.c +++ b/drivers/rtc/rtc-bd70528.c | |||
@@ -416,11 +416,8 @@ static int bd70528_probe(struct platform_device *pdev) | |||
416 | bd_rtc->dev = &pdev->dev; | 416 | bd_rtc->dev = &pdev->dev; |
417 | 417 | ||
418 | irq = platform_get_irq_byname(pdev, "bd70528-rtc-alm"); | 418 | irq = platform_get_irq_byname(pdev, "bd70528-rtc-alm"); |
419 | 419 | if (irq < 0) | |
420 | if (irq < 0) { | ||
421 | dev_err(&pdev->dev, "Failed to get irq\n"); | ||
422 | return irq; | 420 | return irq; |
423 | } | ||
424 | 421 | ||
425 | platform_set_drvdata(pdev, bd_rtc); | 422 | platform_set_drvdata(pdev, bd_rtc); |
426 | 423 | ||
diff --git a/drivers/rtc/rtc-davinci.c b/drivers/rtc/rtc-davinci.c index fcb71bf4d492..d8e0db2e7fc6 100644 --- a/drivers/rtc/rtc-davinci.c +++ b/drivers/rtc/rtc-davinci.c | |||
@@ -477,10 +477,8 @@ static int __init davinci_rtc_probe(struct platform_device *pdev) | |||
477 | return -ENOMEM; | 477 | return -ENOMEM; |
478 | 478 | ||
479 | davinci_rtc->irq = platform_get_irq(pdev, 0); | 479 | davinci_rtc->irq = platform_get_irq(pdev, 0); |
480 | if (davinci_rtc->irq < 0) { | 480 | if (davinci_rtc->irq < 0) |
481 | dev_err(dev, "no RTC irq\n"); | ||
482 | return davinci_rtc->irq; | 481 | return davinci_rtc->irq; |
483 | } | ||
484 | 482 | ||
485 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 483 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
486 | davinci_rtc->base = devm_ioremap_resource(dev, res); | 484 | davinci_rtc->base = devm_ioremap_resource(dev, res); |
diff --git a/drivers/rtc/rtc-jz4740.c b/drivers/rtc/rtc-jz4740.c index 9e7b3a04debc..3ec6bb230cd5 100644 --- a/drivers/rtc/rtc-jz4740.c +++ b/drivers/rtc/rtc-jz4740.c | |||
@@ -323,10 +323,8 @@ static int jz4740_rtc_probe(struct platform_device *pdev) | |||
323 | rtc->type = id->driver_data; | 323 | rtc->type = id->driver_data; |
324 | 324 | ||
325 | rtc->irq = platform_get_irq(pdev, 0); | 325 | rtc->irq = platform_get_irq(pdev, 0); |
326 | if (rtc->irq < 0) { | 326 | if (rtc->irq < 0) |
327 | dev_err(&pdev->dev, "Failed to get platform irq\n"); | ||
328 | return -ENOENT; | 327 | return -ENOENT; |
329 | } | ||
330 | 328 | ||
331 | mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 329 | mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
332 | rtc->base = devm_ioremap_resource(&pdev->dev, mem); | 330 | rtc->base = devm_ioremap_resource(&pdev->dev, mem); |
diff --git a/drivers/rtc/rtc-max77686.c b/drivers/rtc/rtc-max77686.c index 3d924c34fd73..7a98e0744878 100644 --- a/drivers/rtc/rtc-max77686.c +++ b/drivers/rtc/rtc-max77686.c | |||
@@ -673,11 +673,8 @@ static int max77686_init_rtc_regmap(struct max77686_rtc_info *info) | |||
673 | struct platform_device *pdev = to_platform_device(info->dev); | 673 | struct platform_device *pdev = to_platform_device(info->dev); |
674 | 674 | ||
675 | info->rtc_irq = platform_get_irq(pdev, 0); | 675 | info->rtc_irq = platform_get_irq(pdev, 0); |
676 | if (info->rtc_irq < 0) { | 676 | if (info->rtc_irq < 0) |
677 | dev_err(info->dev, "Failed to get rtc interrupts: %d\n", | ||
678 | info->rtc_irq); | ||
679 | return info->rtc_irq; | 677 | return info->rtc_irq; |
680 | } | ||
681 | } else { | 678 | } else { |
682 | info->rtc_irq = parent_i2c->irq; | 679 | info->rtc_irq = parent_i2c->irq; |
683 | } | 680 | } |
diff --git a/drivers/rtc/rtc-mt7622.c b/drivers/rtc/rtc-mt7622.c index 82b0816ec6c1..16bd26b5aa6f 100644 --- a/drivers/rtc/rtc-mt7622.c +++ b/drivers/rtc/rtc-mt7622.c | |||
@@ -329,7 +329,6 @@ static int mtk_rtc_probe(struct platform_device *pdev) | |||
329 | 329 | ||
330 | hw->irq = platform_get_irq(pdev, 0); | 330 | hw->irq = platform_get_irq(pdev, 0); |
331 | if (hw->irq < 0) { | 331 | if (hw->irq < 0) { |
332 | dev_err(&pdev->dev, "No IRQ resource\n"); | ||
333 | ret = hw->irq; | 332 | ret = hw->irq; |
334 | goto err; | 333 | goto err; |
335 | } | 334 | } |
diff --git a/drivers/rtc/rtc-pic32.c b/drivers/rtc/rtc-pic32.c index 1c4de6e90da0..17653ed52ebb 100644 --- a/drivers/rtc/rtc-pic32.c +++ b/drivers/rtc/rtc-pic32.c | |||
@@ -308,10 +308,8 @@ static int pic32_rtc_probe(struct platform_device *pdev) | |||
308 | platform_set_drvdata(pdev, pdata); | 308 | platform_set_drvdata(pdev, pdata); |
309 | 309 | ||
310 | pdata->alarm_irq = platform_get_irq(pdev, 0); | 310 | pdata->alarm_irq = platform_get_irq(pdev, 0); |
311 | if (pdata->alarm_irq < 0) { | 311 | if (pdata->alarm_irq < 0) |
312 | dev_err(&pdev->dev, "no irq for alarm\n"); | ||
313 | return pdata->alarm_irq; | 312 | return pdata->alarm_irq; |
314 | } | ||
315 | 313 | ||
316 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 314 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
317 | pdata->reg_base = devm_ioremap_resource(&pdev->dev, res); | 315 | pdata->reg_base = devm_ioremap_resource(&pdev->dev, res); |
diff --git a/drivers/rtc/rtc-pm8xxx.c b/drivers/rtc/rtc-pm8xxx.c index 9f9839c47e2f..f5a30e0f16c2 100644 --- a/drivers/rtc/rtc-pm8xxx.c +++ b/drivers/rtc/rtc-pm8xxx.c | |||
@@ -468,10 +468,8 @@ static int pm8xxx_rtc_probe(struct platform_device *pdev) | |||
468 | } | 468 | } |
469 | 469 | ||
470 | rtc_dd->rtc_alarm_irq = platform_get_irq(pdev, 0); | 470 | rtc_dd->rtc_alarm_irq = platform_get_irq(pdev, 0); |
471 | if (rtc_dd->rtc_alarm_irq < 0) { | 471 | if (rtc_dd->rtc_alarm_irq < 0) |
472 | dev_err(&pdev->dev, "Alarm IRQ resource absent!\n"); | ||
473 | return -ENXIO; | 472 | return -ENXIO; |
474 | } | ||
475 | 473 | ||
476 | rtc_dd->allow_set_time = of_property_read_bool(pdev->dev.of_node, | 474 | rtc_dd->allow_set_time = of_property_read_bool(pdev->dev.of_node, |
477 | "allow-set-time"); | 475 | "allow-set-time"); |
diff --git a/drivers/rtc/rtc-puv3.c b/drivers/rtc/rtc-puv3.c index 63b9e73fb97d..56a7cf1547a7 100644 --- a/drivers/rtc/rtc-puv3.c +++ b/drivers/rtc/rtc-puv3.c | |||
@@ -186,16 +186,12 @@ static int puv3_rtc_probe(struct platform_device *pdev) | |||
186 | 186 | ||
187 | /* find the IRQs */ | 187 | /* find the IRQs */ |
188 | puv3_rtc_tickno = platform_get_irq(pdev, 1); | 188 | puv3_rtc_tickno = platform_get_irq(pdev, 1); |
189 | if (puv3_rtc_tickno < 0) { | 189 | if (puv3_rtc_tickno < 0) |
190 | dev_err(&pdev->dev, "no irq for rtc tick\n"); | ||
191 | return -ENOENT; | 190 | return -ENOENT; |
192 | } | ||
193 | 191 | ||
194 | puv3_rtc_alarmno = platform_get_irq(pdev, 0); | 192 | puv3_rtc_alarmno = platform_get_irq(pdev, 0); |
195 | if (puv3_rtc_alarmno < 0) { | 193 | if (puv3_rtc_alarmno < 0) |
196 | dev_err(&pdev->dev, "no irq for alarm\n"); | ||
197 | return -ENOENT; | 194 | return -ENOENT; |
198 | } | ||
199 | 195 | ||
200 | dev_dbg(&pdev->dev, "PKUnity_rtc: tick irq %d, alarm irq %d\n", | 196 | dev_dbg(&pdev->dev, "PKUnity_rtc: tick irq %d, alarm irq %d\n", |
201 | puv3_rtc_tickno, puv3_rtc_alarmno); | 197 | puv3_rtc_tickno, puv3_rtc_alarmno); |
diff --git a/drivers/rtc/rtc-pxa.c b/drivers/rtc/rtc-pxa.c index a7827fe7fb7b..d2f1d8f754bf 100644 --- a/drivers/rtc/rtc-pxa.c +++ b/drivers/rtc/rtc-pxa.c | |||
@@ -324,15 +324,11 @@ static int __init pxa_rtc_probe(struct platform_device *pdev) | |||
324 | } | 324 | } |
325 | 325 | ||
326 | sa1100_rtc->irq_1hz = platform_get_irq(pdev, 0); | 326 | sa1100_rtc->irq_1hz = platform_get_irq(pdev, 0); |
327 | if (sa1100_rtc->irq_1hz < 0) { | 327 | if (sa1100_rtc->irq_1hz < 0) |
328 | dev_err(dev, "No 1Hz IRQ resource defined\n"); | ||
329 | return -ENXIO; | 328 | return -ENXIO; |
330 | } | ||
331 | sa1100_rtc->irq_alarm = platform_get_irq(pdev, 1); | 329 | sa1100_rtc->irq_alarm = platform_get_irq(pdev, 1); |
332 | if (sa1100_rtc->irq_alarm < 0) { | 330 | if (sa1100_rtc->irq_alarm < 0) |
333 | dev_err(dev, "No alarm IRQ resource defined\n"); | ||
334 | return -ENXIO; | 331 | return -ENXIO; |
335 | } | ||
336 | 332 | ||
337 | pxa_rtc->base = devm_ioremap(dev, pxa_rtc->ress->start, | 333 | pxa_rtc->base = devm_ioremap(dev, pxa_rtc->ress->start, |
338 | resource_size(pxa_rtc->ress)); | 334 | resource_size(pxa_rtc->ress)); |
diff --git a/drivers/rtc/rtc-rk808.c b/drivers/rtc/rtc-rk808.c index c34540baa12a..c0334c602e88 100644 --- a/drivers/rtc/rtc-rk808.c +++ b/drivers/rtc/rtc-rk808.c | |||
@@ -434,12 +434,8 @@ static int rk808_rtc_probe(struct platform_device *pdev) | |||
434 | rk808_rtc->rtc->ops = &rk808_rtc_ops; | 434 | rk808_rtc->rtc->ops = &rk808_rtc_ops; |
435 | 435 | ||
436 | rk808_rtc->irq = platform_get_irq(pdev, 0); | 436 | rk808_rtc->irq = platform_get_irq(pdev, 0); |
437 | if (rk808_rtc->irq < 0) { | 437 | if (rk808_rtc->irq < 0) |
438 | if (rk808_rtc->irq != -EPROBE_DEFER) | ||
439 | dev_err(&pdev->dev, "Wake up is not possible as irq = %d\n", | ||
440 | rk808_rtc->irq); | ||
441 | return rk808_rtc->irq; | 438 | return rk808_rtc->irq; |
442 | } | ||
443 | 439 | ||
444 | /* request alarm irq of rk808 */ | 440 | /* request alarm irq of rk808 */ |
445 | ret = devm_request_threaded_irq(&pdev->dev, rk808_rtc->irq, NULL, | 441 | ret = devm_request_threaded_irq(&pdev->dev, rk808_rtc->irq, NULL, |
diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c index 74bf6473a05d..7801249c254b 100644 --- a/drivers/rtc/rtc-s3c.c +++ b/drivers/rtc/rtc-s3c.c | |||
@@ -453,10 +453,8 @@ static int s3c_rtc_probe(struct platform_device *pdev) | |||
453 | 453 | ||
454 | /* find the IRQs */ | 454 | /* find the IRQs */ |
455 | info->irq_tick = platform_get_irq(pdev, 1); | 455 | info->irq_tick = platform_get_irq(pdev, 1); |
456 | if (info->irq_tick < 0) { | 456 | if (info->irq_tick < 0) |
457 | dev_err(&pdev->dev, "no irq for rtc tick\n"); | ||
458 | return info->irq_tick; | 457 | return info->irq_tick; |
459 | } | ||
460 | 458 | ||
461 | info->dev = &pdev->dev; | 459 | info->dev = &pdev->dev; |
462 | info->data = of_device_get_match_data(&pdev->dev); | 460 | info->data = of_device_get_match_data(&pdev->dev); |
@@ -470,10 +468,8 @@ static int s3c_rtc_probe(struct platform_device *pdev) | |||
470 | platform_set_drvdata(pdev, info); | 468 | platform_set_drvdata(pdev, info); |
471 | 469 | ||
472 | info->irq_alarm = platform_get_irq(pdev, 0); | 470 | info->irq_alarm = platform_get_irq(pdev, 0); |
473 | if (info->irq_alarm < 0) { | 471 | if (info->irq_alarm < 0) |
474 | dev_err(&pdev->dev, "no irq for alarm\n"); | ||
475 | return info->irq_alarm; | 472 | return info->irq_alarm; |
476 | } | ||
477 | 473 | ||
478 | dev_dbg(&pdev->dev, "s3c2410_rtc: tick irq %d, alarm irq %d\n", | 474 | dev_dbg(&pdev->dev, "s3c2410_rtc: tick irq %d, alarm irq %d\n", |
479 | info->irq_tick, info->irq_alarm); | 475 | info->irq_tick, info->irq_alarm); |
diff --git a/drivers/rtc/rtc-sc27xx.c b/drivers/rtc/rtc-sc27xx.c index b4eb3b3c6c2c..698e1e51efca 100644 --- a/drivers/rtc/rtc-sc27xx.c +++ b/drivers/rtc/rtc-sc27xx.c | |||
@@ -614,10 +614,8 @@ static int sprd_rtc_probe(struct platform_device *pdev) | |||
614 | } | 614 | } |
615 | 615 | ||
616 | rtc->irq = platform_get_irq(pdev, 0); | 616 | rtc->irq = platform_get_irq(pdev, 0); |
617 | if (rtc->irq < 0) { | 617 | if (rtc->irq < 0) |
618 | dev_err(&pdev->dev, "failed to get RTC irq number\n"); | ||
619 | return rtc->irq; | 618 | return rtc->irq; |
620 | } | ||
621 | 619 | ||
622 | rtc->rtc = devm_rtc_allocate_device(&pdev->dev); | 620 | rtc->rtc = devm_rtc_allocate_device(&pdev->dev); |
623 | if (IS_ERR(rtc->rtc)) | 621 | if (IS_ERR(rtc->rtc)) |
diff --git a/drivers/rtc/rtc-spear.c b/drivers/rtc/rtc-spear.c index 0567944fd4f8..9f23b24f466c 100644 --- a/drivers/rtc/rtc-spear.c +++ b/drivers/rtc/rtc-spear.c | |||
@@ -358,10 +358,8 @@ static int spear_rtc_probe(struct platform_device *pdev) | |||
358 | 358 | ||
359 | /* alarm irqs */ | 359 | /* alarm irqs */ |
360 | irq = platform_get_irq(pdev, 0); | 360 | irq = platform_get_irq(pdev, 0); |
361 | if (irq < 0) { | 361 | if (irq < 0) |
362 | dev_err(&pdev->dev, "no update irq?\n"); | ||
363 | return irq; | 362 | return irq; |
364 | } | ||
365 | 363 | ||
366 | status = devm_request_irq(&pdev->dev, irq, spear_rtc_irq, 0, pdev->name, | 364 | status = devm_request_irq(&pdev->dev, irq, spear_rtc_irq, 0, pdev->name, |
367 | config); | 365 | config); |
diff --git a/drivers/rtc/rtc-stm32.c b/drivers/rtc/rtc-stm32.c index 773a1990b93f..2999e33a7e37 100644 --- a/drivers/rtc/rtc-stm32.c +++ b/drivers/rtc/rtc-stm32.c | |||
@@ -776,7 +776,6 @@ static int stm32_rtc_probe(struct platform_device *pdev) | |||
776 | 776 | ||
777 | rtc->irq_alarm = platform_get_irq(pdev, 0); | 777 | rtc->irq_alarm = platform_get_irq(pdev, 0); |
778 | if (rtc->irq_alarm <= 0) { | 778 | if (rtc->irq_alarm <= 0) { |
779 | dev_err(&pdev->dev, "no alarm irq\n"); | ||
780 | ret = rtc->irq_alarm; | 779 | ret = rtc->irq_alarm; |
781 | goto err; | 780 | goto err; |
782 | } | 781 | } |
diff --git a/drivers/rtc/rtc-sun6i.c b/drivers/rtc/rtc-sun6i.c index c0e75c373605..dbd676db431e 100644 --- a/drivers/rtc/rtc-sun6i.c +++ b/drivers/rtc/rtc-sun6i.c | |||
@@ -610,10 +610,8 @@ static int sun6i_rtc_probe(struct platform_device *pdev) | |||
610 | chip->dev = &pdev->dev; | 610 | chip->dev = &pdev->dev; |
611 | 611 | ||
612 | chip->irq = platform_get_irq(pdev, 0); | 612 | chip->irq = platform_get_irq(pdev, 0); |
613 | if (chip->irq < 0) { | 613 | if (chip->irq < 0) |
614 | dev_err(&pdev->dev, "No IRQ resource\n"); | ||
615 | return chip->irq; | 614 | return chip->irq; |
616 | } | ||
617 | 615 | ||
618 | ret = devm_request_irq(&pdev->dev, chip->irq, sun6i_rtc_alarmirq, | 616 | ret = devm_request_irq(&pdev->dev, chip->irq, sun6i_rtc_alarmirq, |
619 | 0, dev_name(&pdev->dev), chip); | 617 | 0, dev_name(&pdev->dev), chip); |
diff --git a/drivers/rtc/rtc-sunxi.c b/drivers/rtc/rtc-sunxi.c index 6eeabb81106f..0bb69a7f9e46 100644 --- a/drivers/rtc/rtc-sunxi.c +++ b/drivers/rtc/rtc-sunxi.c | |||
@@ -442,10 +442,8 @@ static int sunxi_rtc_probe(struct platform_device *pdev) | |||
442 | return PTR_ERR(chip->base); | 442 | return PTR_ERR(chip->base); |
443 | 443 | ||
444 | chip->irq = platform_get_irq(pdev, 0); | 444 | chip->irq = platform_get_irq(pdev, 0); |
445 | if (chip->irq < 0) { | 445 | if (chip->irq < 0) |
446 | dev_err(&pdev->dev, "No IRQ resource\n"); | ||
447 | return chip->irq; | 446 | return chip->irq; |
448 | } | ||
449 | ret = devm_request_irq(&pdev->dev, chip->irq, sunxi_rtc_alarmirq, | 447 | ret = devm_request_irq(&pdev->dev, chip->irq, sunxi_rtc_alarmirq, |
450 | 0, dev_name(&pdev->dev), chip); | 448 | 0, dev_name(&pdev->dev), chip); |
451 | if (ret) { | 449 | if (ret) { |
diff --git a/drivers/rtc/rtc-tegra.c b/drivers/rtc/rtc-tegra.c index 8fa1b3febf69..14bf835229e6 100644 --- a/drivers/rtc/rtc-tegra.c +++ b/drivers/rtc/rtc-tegra.c | |||
@@ -290,10 +290,8 @@ static int tegra_rtc_probe(struct platform_device *pdev) | |||
290 | return PTR_ERR(info->base); | 290 | return PTR_ERR(info->base); |
291 | 291 | ||
292 | ret = platform_get_irq(pdev, 0); | 292 | ret = platform_get_irq(pdev, 0); |
293 | if (ret <= 0) { | 293 | if (ret <= 0) |
294 | dev_err(&pdev->dev, "failed to get platform IRQ: %d\n", ret); | ||
295 | return ret; | 294 | return ret; |
296 | } | ||
297 | 295 | ||
298 | info->irq = ret; | 296 | info->irq = ret; |
299 | 297 | ||
diff --git a/drivers/rtc/rtc-vt8500.c b/drivers/rtc/rtc-vt8500.c index f59d232810de..d5d14cf86e0d 100644 --- a/drivers/rtc/rtc-vt8500.c +++ b/drivers/rtc/rtc-vt8500.c | |||
@@ -212,10 +212,8 @@ static int vt8500_rtc_probe(struct platform_device *pdev) | |||
212 | platform_set_drvdata(pdev, vt8500_rtc); | 212 | platform_set_drvdata(pdev, vt8500_rtc); |
213 | 213 | ||
214 | vt8500_rtc->irq_alarm = platform_get_irq(pdev, 0); | 214 | vt8500_rtc->irq_alarm = platform_get_irq(pdev, 0); |
215 | if (vt8500_rtc->irq_alarm < 0) { | 215 | if (vt8500_rtc->irq_alarm < 0) |
216 | dev_err(&pdev->dev, "No alarm IRQ resource defined\n"); | ||
217 | return vt8500_rtc->irq_alarm; | 216 | return vt8500_rtc->irq_alarm; |
218 | } | ||
219 | 217 | ||
220 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 218 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
221 | vt8500_rtc->regbase = devm_ioremap_resource(&pdev->dev, res); | 219 | vt8500_rtc->regbase = devm_ioremap_resource(&pdev->dev, res); |
diff --git a/drivers/rtc/rtc-xgene.c b/drivers/rtc/rtc-xgene.c index 9888383f0088..9683fbf7c78d 100644 --- a/drivers/rtc/rtc-xgene.c +++ b/drivers/rtc/rtc-xgene.c | |||
@@ -157,10 +157,8 @@ static int xgene_rtc_probe(struct platform_device *pdev) | |||
157 | return PTR_ERR(pdata->rtc); | 157 | return PTR_ERR(pdata->rtc); |
158 | 158 | ||
159 | irq = platform_get_irq(pdev, 0); | 159 | irq = platform_get_irq(pdev, 0); |
160 | if (irq < 0) { | 160 | if (irq < 0) |
161 | dev_err(&pdev->dev, "No IRQ resource\n"); | ||
162 | return irq; | 161 | return irq; |
163 | } | ||
164 | ret = devm_request_irq(&pdev->dev, irq, xgene_rtc_interrupt, 0, | 162 | ret = devm_request_irq(&pdev->dev, irq, xgene_rtc_interrupt, 0, |
165 | dev_name(&pdev->dev), pdata); | 163 | dev_name(&pdev->dev), pdata); |
166 | if (ret) { | 164 | if (ret) { |
diff --git a/drivers/rtc/rtc-zynqmp.c b/drivers/rtc/rtc-zynqmp.c index 00639594de0c..2c762757fb54 100644 --- a/drivers/rtc/rtc-zynqmp.c +++ b/drivers/rtc/rtc-zynqmp.c | |||
@@ -218,10 +218,8 @@ static int xlnx_rtc_probe(struct platform_device *pdev) | |||
218 | return PTR_ERR(xrtcdev->reg_base); | 218 | return PTR_ERR(xrtcdev->reg_base); |
219 | 219 | ||
220 | xrtcdev->alarm_irq = platform_get_irq_byname(pdev, "alarm"); | 220 | xrtcdev->alarm_irq = platform_get_irq_byname(pdev, "alarm"); |
221 | if (xrtcdev->alarm_irq < 0) { | 221 | if (xrtcdev->alarm_irq < 0) |
222 | dev_err(&pdev->dev, "no irq resource\n"); | ||
223 | return xrtcdev->alarm_irq; | 222 | return xrtcdev->alarm_irq; |
224 | } | ||
225 | ret = devm_request_irq(&pdev->dev, xrtcdev->alarm_irq, | 223 | ret = devm_request_irq(&pdev->dev, xrtcdev->alarm_irq, |
226 | xlnx_rtc_interrupt, 0, | 224 | xlnx_rtc_interrupt, 0, |
227 | dev_name(&pdev->dev), xrtcdev); | 225 | dev_name(&pdev->dev), xrtcdev); |
@@ -231,10 +229,8 @@ static int xlnx_rtc_probe(struct platform_device *pdev) | |||
231 | } | 229 | } |
232 | 230 | ||
233 | xrtcdev->sec_irq = platform_get_irq_byname(pdev, "sec"); | 231 | xrtcdev->sec_irq = platform_get_irq_byname(pdev, "sec"); |
234 | if (xrtcdev->sec_irq < 0) { | 232 | if (xrtcdev->sec_irq < 0) |
235 | dev_err(&pdev->dev, "no irq resource\n"); | ||
236 | return xrtcdev->sec_irq; | 233 | return xrtcdev->sec_irq; |
237 | } | ||
238 | ret = devm_request_irq(&pdev->dev, xrtcdev->sec_irq, | 234 | ret = devm_request_irq(&pdev->dev, xrtcdev->sec_irq, |
239 | xlnx_rtc_interrupt, 0, | 235 | xlnx_rtc_interrupt, 0, |
240 | dev_name(&pdev->dev), xrtcdev); | 236 | dev_name(&pdev->dev), xrtcdev); |