Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp29403245rwd; Wed, 5 Jul 2023 11:16:55 -0700 (PDT) X-Google-Smtp-Source: APBJJlHPh30lzZRsMH9ofZ/QkFZIH1ODm7bHvDM/NHCrzDR4ivN1HDEJ2W6FL8/2NrBsovlVALJB X-Received: by 2002:a92:c70b:0:b0:345:cf3f:2fd with SMTP id a11-20020a92c70b000000b00345cf3f02fdmr16741875ilp.13.1688581015020; Wed, 05 Jul 2023 11:16:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688581014; cv=none; d=google.com; s=arc-20160816; b=r9Ehl/gI3xBY8YxjTLgUE7v2UZQf3b4pvdFL5pHgjYj+ayVs9T0ny1W3WJgGVo7+iH IBQNYchiz/PQ/ziVslEOG/E7pXaC5T9BhG1eZYcyufszJffc1DTwD3CDjxieWDACjSNW 1qBM0+A7H+NOiTzGLC7PiChchWOxCPRbtVLdTBcUFAMoVNJzqECDIF0yspi8zhSdMSnE +0B7ItFd/uZDC1fi/8Wnp87eI4f+us4qV5EMaSFQuklmV6MhYe9a8iURKXwiv4wlAaSG vciOyVp391FxlwLiol31c8VvZnbYLIqBrEBjEe86aW5loFuYMXirKPC/2RDhU5VhWU4S /H1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=MXa5UGOKwnuvRKspTklCvl9TbHyucJqEV4w5bCIDszM=; fh=5pGMV673fZ76hUIw4USzjq+zMK+c1PI7r40jfOQEA90=; b=L5jZmOg/CacRhiNkeXH5K1RIBtjlVRYWSJeknbOP2xprcSu9Cp96ND+ILgxLsP16Id M65xO+1EQW4waY8VQDy3TOepYhgmxNyEsdlyBm6fM1gW6I59VmzKjTD+A7knj+w86n0j Yi+CbHHAYQ0cTiN0dL8GoDjPo78on6g5c6VDAxgBfq2XWpx2Mda/dIZjcvGyRDvi1SIE lg15iqa5e7rD0rd3nJaA8L1Kv+R0/QHejAJNkQ7a+lNU7g8TC/J4dMO808l+2kXsluIY QQn7Y15FvGK7EWCkkVI6jr4F8UAThXOADY4g78Mws7yH1jRPsn8XSAs+qB+IPXzhj7JX obCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=D9nczGzs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v16-20020a63d550000000b0052c688e6608si23525949pgi.505.2023.07.05.11.16.41; Wed, 05 Jul 2023 11:16:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=D9nczGzs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233109AbjGERoT (ORCPT + 99 others); Wed, 5 Jul 2023 13:44:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233000AbjGERoP (ORCPT ); Wed, 5 Jul 2023 13:44:15 -0400 Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [185.132.182.106]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D6EB18E; Wed, 5 Jul 2023 10:44:14 -0700 (PDT) Received: from pps.filterd (m0288072.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 365EZlaU001538; Wed, 5 Jul 2023 19:44:05 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=selector1; bh=MXa5UGOKwnuvRKspTklCvl9TbHyucJqEV4w5bCIDszM=; b=D9nczGzstJ6f5lpSWPoHDy9dcrhQP/+mh1s3PXBz4cDva5p7HX/YUnTy9lZQOSd4Kaua A8CnEg84GbIRl8aM2QZBK87gkbGDQnRVdHNjVdkLX7aLA3IPG+Ontgi7THTyFyPDMIRw 20D3lK6iO/I/wB/k7tuqc4m/w3a5A6KNXbcbj/x0+4rniuaw47KmWJtyhud+daMfiKDs b8bw64jEq1ifH4jJHs9Xi0MZ0wlly7siey4V/fNob4hpykEFUAZOFfx28UU1sjx/AOGn +QDEMqW4LPotR0cOycm85Oct3cIlK7eHPb2pZrKzqkZ6iMzguDjGoiPG8mXOD7inaC/g mQ== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3rn09qp4fv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 05 Jul 2023 19:44:05 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 2C94C10005E; Wed, 5 Jul 2023 19:44:05 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 25F9D252250; Wed, 5 Jul 2023 19:44:05 +0200 (CEST) Received: from localhost (10.201.20.168) by SHFDAG1NODE1.st.com (10.75.129.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Wed, 5 Jul 2023 19:44:04 +0200 From: Valentin Caron To: Alexandre Belloni , Alessandro Zummo CC: Alexandre Torgue , Antonio Borneo , Christophe Guibout , Gabriel Fernandez , , , , , Valentin Caron Subject: [PATCH v2 4/7] rtc: stm32: don't print an error on probe deferral Date: Wed, 5 Jul 2023 19:43:54 +0200 Message-ID: <20230705174357.353616-5-valentin.caron@foss.st.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230705174357.353616-1-valentin.caron@foss.st.com> References: <20230705174357.353616-1-valentin.caron@foss.st.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.201.20.168] X-ClientProxiedBy: SHFCAS1NODE2.st.com (10.75.129.73) To SHFDAG1NODE1.st.com (10.75.129.69) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-05_09,2023-07-05_01,2023-05-22_02 X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Change stm32-rtc driver to not generate an error message when device probe operation is deferred for a clock. Signed-off-by: Etienne Carriere Signed-off-by: Valentin Caron --- 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 #include +#include #include #include #include @@ -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