diff options
author | André Draszik <andre.draszik@linaro.org> | 2025-03-04 17:05:37 +0000 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2025-03-05 23:08:00 +0100 |
commit | 38c7aaeab8b888180abaec88c4304a95e1f74b76 (patch) | |
tree | c27a68454fcec60cf62674b1a5c8af9310461f3f /drivers/rtc | |
parent | a0470062748fc96bdd3eef9e0acf9465688db088 (diff) |
rtc: meson-vrtc: drop needless struct meson_vrtc_data::rtc member
The memory pointed to by the ::rtc member is managed via devres, and
no code in this driver uses it past _probe().
We can drop it from the structure and just use a local temporary
variable, reducing runtime memory consumption by a few bytes.
Signed-off-by: André Draszik <andre.draszik@linaro.org>
Link: https://lore.kernel.org/r/20250304-rtc-cleanups-v2-9-d4689a71668c@linaro.org
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc')
-rw-r--r-- | drivers/rtc/rtc-meson-vrtc.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/rtc/rtc-meson-vrtc.c b/drivers/rtc/rtc-meson-vrtc.c index 5849729f7d01..7d38258cbe37 100644 --- a/drivers/rtc/rtc-meson-vrtc.c +++ b/drivers/rtc/rtc-meson-vrtc.c @@ -13,7 +13,6 @@ struct meson_vrtc_data { void __iomem *io_alarm; - struct rtc_device *rtc; unsigned long alarm_time; bool enabled; }; @@ -65,6 +64,7 @@ static const struct rtc_class_ops meson_vrtc_ops = { static int meson_vrtc_probe(struct platform_device *pdev) { struct meson_vrtc_data *vrtc; + struct rtc_device *rtc; vrtc = devm_kzalloc(&pdev->dev, sizeof(*vrtc), GFP_KERNEL); if (!vrtc) @@ -78,12 +78,12 @@ static int meson_vrtc_probe(struct platform_device *pdev) platform_set_drvdata(pdev, vrtc); - vrtc->rtc = devm_rtc_allocate_device(&pdev->dev); - if (IS_ERR(vrtc->rtc)) - return PTR_ERR(vrtc->rtc); + rtc = devm_rtc_allocate_device(&pdev->dev); + if (IS_ERR(rtc)) + return PTR_ERR(rtc); - vrtc->rtc->ops = &meson_vrtc_ops; - return devm_rtc_register_device(vrtc->rtc); + rtc->ops = &meson_vrtc_ops; + return devm_rtc_register_device(rtc); } static int __maybe_unused meson_vrtc_suspend(struct device *dev) |