[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230705174357.353616-5-valentin.caron@foss.st.com>
Date: Wed, 5 Jul 2023 19:43:54 +0200
From: Valentin Caron <valentin.caron@...s.st.com>
To: Alexandre Belloni <alexandre.belloni@...tlin.com>,
Alessandro Zummo <a.zummo@...ertech.it>
CC: Alexandre Torgue <alexandre.torgue@...s.st.com>,
Antonio Borneo <antonio.borneo@...s.st.com>,
Christophe Guibout <christophe.guibout@...s.st.com>,
Gabriel Fernandez <gabriel.fernandez@...s.st.com>,
<linux-rtc@...r.kernel.org>,
<linux-stm32@...md-mailman.stormreply.com>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>,
Valentin Caron <valentin.caron@...s.st.com>
Subject: [PATCH v2 4/7] rtc: stm32: don't print an error on probe deferral
Change stm32-rtc driver to not generate an error message when
device probe operation is deferred for a clock.
Signed-off-by: Etienne Carriere <etienne.carriere@...s.st.com>
Signed-off-by: Valentin Caron <valentin.caron@...s.st.com>
---
drivers/rtc/rtc-stm32.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/drivers/rtc/rtc-stm32.c b/drivers/rtc/rtc-stm32.c
index cad88668bcfb..5ebf0b8e75f9 100644
--- a/drivers/rtc/rtc-stm32.c
+++ b/drivers/rtc/rtc-stm32.c
@@ -6,6 +6,7 @@
#include <linux/bcd.h>
#include <linux/clk.h>
+#include <linux/errno.h>
#include <linux/iopoll.h>
#include <linux/ioport.h>
#include <linux/mfd/syscon.h>
@@ -759,16 +760,13 @@ static int stm32_rtc_probe(struct platform_device *pdev)
rtc->rtc_ck = devm_clk_get(&pdev->dev, NULL);
} else {
rtc->pclk = devm_clk_get(&pdev->dev, "pclk");
- if (IS_ERR(rtc->pclk)) {
- dev_err(&pdev->dev, "no pclk clock");
- return PTR_ERR(rtc->pclk);
- }
+ if (IS_ERR(rtc->pclk))
+ return dev_err_probe(&pdev->dev, PTR_ERR(rtc->pclk), "no pclk clock");
+
rtc->rtc_ck = devm_clk_get(&pdev->dev, "rtc_ck");
}
- if (IS_ERR(rtc->rtc_ck)) {
- dev_err(&pdev->dev, "no rtc_ck clock");
- return PTR_ERR(rtc->rtc_ck);
- }
+ if (IS_ERR(rtc->rtc_ck))
+ return dev_err_probe(&pdev->dev, PTR_ERR(rtc->rtc_ck), "no rtc_ck clock");
if (rtc->data->has_pclk) {
ret = clk_prepare_enable(rtc->pclk);
--
2.25.1
Powered by blists - more mailing lists