Skip to content

Commit 8c28c49

Browse files
Wolfram Sangalexandrebelloni
authored andcommitted
rtc: use boolean values with device_init_wakeup()
device_init_wakeup() second argument is a bool type. Use proper boolean values when calling it to match the type and to produce unambiguous code which is easier to understand. Signed-off-by: Wolfram Sang <[email protected]> Reviewed-by: Charles Keepax <[email protected]> Reviewed-by: Andre Przywara <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
1 parent 7158c61 commit 8c28c49

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+62
-62
lines changed

drivers/rtc/rtc-88pm80x.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ static int pm80x_rtc_probe(struct platform_device *pdev)
308308
/* remember whether this power up is caused by PMIC RTC or not */
309309
info->rtc_dev->dev.platform_data = &pdata->rtc_wakeup;
310310

311-
device_init_wakeup(&pdev->dev, 1);
311+
device_init_wakeup(&pdev->dev, true);
312312

313313
return 0;
314314
out_rtc:

drivers/rtc/rtc-88pm860x.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ static int pm860x_rtc_probe(struct platform_device *pdev)
326326
schedule_delayed_work(&info->calib_work, VRTC_CALIB_INTERVAL);
327327
#endif /* VRTC_CALIBRATION */
328328

329-
device_init_wakeup(&pdev->dev, 1);
329+
device_init_wakeup(&pdev->dev, true);
330330

331331
return 0;
332332
}

drivers/rtc/rtc-amlogic-a4.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ static int aml_rtc_probe(struct platform_device *pdev)
361361
"failed to get_enable rtc sys clk\n");
362362
aml_rtc_init(rtc);
363363

364-
device_init_wakeup(dev, 1);
364+
device_init_wakeup(dev, true);
365365
platform_set_drvdata(pdev, rtc);
366366

367367
rtc->rtc_dev = devm_rtc_allocate_device(dev);
@@ -391,7 +391,7 @@ static int aml_rtc_probe(struct platform_device *pdev)
391391
return 0;
392392
err_clk:
393393
clk_disable_unprepare(rtc->sys_clk);
394-
device_init_wakeup(dev, 0);
394+
device_init_wakeup(dev, false);
395395

396396
return ret;
397397
}
@@ -426,7 +426,7 @@ static void aml_rtc_remove(struct platform_device *pdev)
426426
struct aml_rtc_data *rtc = dev_get_drvdata(&pdev->dev);
427427

428428
clk_disable_unprepare(rtc->sys_clk);
429-
device_init_wakeup(&pdev->dev, 0);
429+
device_init_wakeup(&pdev->dev, false);
430430
}
431431

432432
static const struct aml_rtc_config a5_rtc_config = {

drivers/rtc/rtc-armada38x.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ static __init int armada38x_rtc_probe(struct platform_device *pdev)
527527
platform_set_drvdata(pdev, rtc);
528528

529529
if (rtc->irq != -1)
530-
device_init_wakeup(&pdev->dev, 1);
530+
device_init_wakeup(&pdev->dev, true);
531531
else
532532
clear_bit(RTC_FEATURE_ALARM, rtc->rtc_dev->features);
533533

drivers/rtc/rtc-as3722.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ static int as3722_rtc_probe(struct platform_device *pdev)
187187
return ret;
188188
}
189189

190-
device_init_wakeup(&pdev->dev, 1);
190+
device_init_wakeup(&pdev->dev, true);
191191

192192
as3722_rtc->rtc = devm_rtc_device_register(&pdev->dev, "as3722-rtc",
193193
&as3722_rtc_ops, THIS_MODULE);

drivers/rtc/rtc-at91rm9200.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ static int __init at91_rtc_probe(struct platform_device *pdev)
528528
* being wake-capable; if it didn't, do that here.
529529
*/
530530
if (!device_can_wakeup(&pdev->dev))
531-
device_init_wakeup(&pdev->dev, 1);
531+
device_init_wakeup(&pdev->dev, true);
532532

533533
if (at91_rtc_config->has_correction)
534534
rtc->ops = &sama5d4_rtc_ops;

drivers/rtc/rtc-at91sam9.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ static int at91_rtc_probe(struct platform_device *pdev)
353353

354354
/* platform setup code should have handled this; sigh */
355355
if (!device_can_wakeup(&pdev->dev))
356-
device_init_wakeup(&pdev->dev, 1);
356+
device_init_wakeup(&pdev->dev, true);
357357

358358
platform_set_drvdata(pdev, rtc);
359359

drivers/rtc/rtc-cadence.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ static void cdns_rtc_remove(struct platform_device *pdev)
359359
struct cdns_rtc *crtc = platform_get_drvdata(pdev);
360360

361361
cdns_rtc_alarm_irq_enable(&pdev->dev, 0);
362-
device_init_wakeup(&pdev->dev, 0);
362+
device_init_wakeup(&pdev->dev, false);
363363

364364
clk_disable_unprepare(crtc->pclk);
365365
clk_disable_unprepare(crtc->ref_clk);

drivers/rtc/rtc-cmos.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,7 @@ static void acpi_cmos_wake_setup(struct device *dev)
864864
dev_info(dev, "RTC can wake from S4\n");
865865

866866
/* RTC always wakes from S1/S2/S3, and often S4/STD */
867-
device_init_wakeup(dev, 1);
867+
device_init_wakeup(dev, true);
868868
}
869869

870870
static void cmos_check_acpi_rtc_status(struct device *dev,

drivers/rtc/rtc-cpcap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ static int cpcap_rtc_probe(struct platform_device *pdev)
295295
}
296296
disable_irq(rtc->update_irq);
297297

298-
err = device_init_wakeup(dev, 1);
298+
err = device_init_wakeup(dev, true);
299299
if (err) {
300300
dev_err(dev, "wakeup initialization failed (%d)\n", err);
301301
/* ignore error and continue without wakeup support */

0 commit comments

Comments
 (0)