Commit 8c28c499 authored by Wolfram Sang's avatar Wolfram Sang Committed by Alexandre Belloni
Browse files

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: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: default avatarCharles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: default avatarAndre Przywara <andre.przywara@arm.com>
Link: https://lore.kernel.org/r/20241217071331.3607-2-wsa+renesas@sang-engineering.com


Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent 7158c61a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -308,7 +308,7 @@ static int pm80x_rtc_probe(struct platform_device *pdev)
	/* remember whether this power up is caused by PMIC RTC or not */
	info->rtc_dev->dev.platform_data = &pdata->rtc_wakeup;

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

	return 0;
out_rtc:
+1 −1
Original line number Diff line number Diff line
@@ -326,7 +326,7 @@ static int pm860x_rtc_probe(struct platform_device *pdev)
	schedule_delayed_work(&info->calib_work, VRTC_CALIB_INTERVAL);
#endif	/* VRTC_CALIBRATION */

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

	return 0;
}
+3 −3
Original line number Diff line number Diff line
@@ -361,7 +361,7 @@ static int aml_rtc_probe(struct platform_device *pdev)
				     "failed to get_enable rtc sys clk\n");
	aml_rtc_init(rtc);

	device_init_wakeup(dev, 1);
	device_init_wakeup(dev, true);
	platform_set_drvdata(pdev, rtc);

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

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

	clk_disable_unprepare(rtc->sys_clk);
	device_init_wakeup(&pdev->dev, 0);
	device_init_wakeup(&pdev->dev, false);
}

static const struct aml_rtc_config a5_rtc_config = {
+1 −1
Original line number Diff line number Diff line
@@ -527,7 +527,7 @@ static __init int armada38x_rtc_probe(struct platform_device *pdev)
	platform_set_drvdata(pdev, rtc);

	if (rtc->irq != -1)
		device_init_wakeup(&pdev->dev, 1);
		device_init_wakeup(&pdev->dev, true);
	else
		clear_bit(RTC_FEATURE_ALARM, rtc->rtc_dev->features);

+1 −1
Original line number Diff line number Diff line
@@ -187,7 +187,7 @@ static int as3722_rtc_probe(struct platform_device *pdev)
		return ret;
	}

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

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