Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp2670506rwa; Mon, 22 Aug 2022 11:27:58 -0700 (PDT) X-Google-Smtp-Source: AA6agR4hzd75atI6yHh6UX+Mm6dQtEEhgBNjkJdMfYq82V9gx+3CK5h/LlW6EYoDcAkYdyA3NzBv X-Received: by 2002:a17:902:d491:b0:172:f654:ac3b with SMTP id c17-20020a170902d49100b00172f654ac3bmr3080741plg.49.1661192878146; Mon, 22 Aug 2022 11:27:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661192878; cv=none; d=google.com; s=arc-20160816; b=w5fAhppgF26cYTbljF1RoteL995HVTLI7E11KQCQuTO4xO40kDXL5CLiN1Ds/LabAn rFOxNQaX0eVlkDB2wQrCAss5nb3JdEx42LB8i53chENIN9J6xECeamC+2yi/MlTeHKAJ RZpaKX8r8cdCqgW/PH2FGtT7WQFer20Y9Xl3BdUzXpxE1fFwI6sO/G+BnM9JFlic0Nzh 26yVNBhM9VxF72zHpTmSNzmPaK3SstBGrau4f5jYOyJe8lN4KeJgNWWpiR52K5Ml5Jli QrXW4CX2ZXVjM10LrHRYSU1vRBeyPYPEwpKICDCqWeLlD8dtn0NTHbTm0R7dX9+EOhsM qBjw== 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 :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=F7InFFORhYfp3DTqBSPE91JChrglDc8nS1CHn+DU5tY=; b=iAk6hbsU9SQFTotq3EcoXMA/AH9SXnxk6TSzyd03Mm2xMlR0p2ZXhjraUR7lP7GbiH UiS6XI6/TRgcu0jDa6t6sUY909/bOFnotMDa8UaplLPmLy3eCO0SMILDOVVgHJHimI9l A9DIoFIxugVCWko6Aeo0sS3aN/RC9EZQT2VGooUSdAQW0FWaRFaf4zVWeZj8bXmx9G2D uCav/zRqi9prQ5NQJJfp3OQm8XuvEO6eStqRD0PCS34JrfFw5d0PX/1WQ3GsJRoL/RUe 8D0nmbrn1jGh/ORgAA6pNLCs5ZAYZmlAPQ7QqCdI5x00IHoZB4pe1cCGEimCAHX7W1h7 5NUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baikalelectronics.ru header.s=mail header.b=GfiKEPSZ; 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=REJECT sp=REJECT dis=NONE) header.from=baikalelectronics.ru Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b13-20020a631b0d000000b0041c7d4a1350si14026227pgb.350.2022.08.22.11.27.46; Mon, 22 Aug 2022 11:27:58 -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=@baikalelectronics.ru header.s=mail header.b=GfiKEPSZ; 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=REJECT sp=REJECT dis=NONE) header.from=baikalelectronics.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237332AbiHVSTt (ORCPT + 99 others); Mon, 22 Aug 2022 14:19:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237313AbiHVSTr (ORCPT ); Mon, 22 Aug 2022 14:19:47 -0400 Received: from mail.baikalelectronics.com (mail.baikalelectronics.com [87.245.175.230]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id F0C6E43E70 for ; Mon, 22 Aug 2022 11:19:37 -0700 (PDT) Received: from mail (mail.baikal.int [192.168.51.25]) by mail.baikalelectronics.com (Postfix) with ESMTP id 1B1D7BB3; Mon, 22 Aug 2022 21:22:48 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 mail.baikalelectronics.com 1B1D7BB3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baikalelectronics.ru; s=mail; t=1661192568; bh=F7InFFORhYfp3DTqBSPE91JChrglDc8nS1CHn+DU5tY=; h=From:To:CC:Subject:Date:From; b=GfiKEPSZLMCcEOBMLWhUKVTh7vsMy0SRFkvzdd4iHokOlNJuaPyJpXNFSKriHivPF N0VL0jIzIB6IzawXRdY2yYTiOuN9nDnW4QN/8n9RZsn+4ySD7VrbT2pLEScsS/nYrN aziGsPjtG5laDj2BScmG9mA5fJAM6lrqRnKQTabY= Received: from localhost (192.168.168.10) by mail (192.168.51.25) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 22 Aug 2022 21:19:33 +0300 From: Serge Semin To: Serge Semin , Mark Brown CC: Serge Semin , Alexey Malahov , Pavel Parkhomenko , Andy Shevchenko , Andy Shevchenko , , Subject: [PATCH] spi: dw: Add deferred controller registration support Date: Mon, 22 Aug 2022 21:18:53 +0300 Message-ID: <20220822181853.23063-1-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: MAIL.baikal.int (192.168.51.25) To mail (192.168.51.25) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS, T_SCC_BODY_TEXT_LINE,T_SPF_PERMERROR 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 It's pretty possible to have the spi_register_controller() method returning -EPROBE_DEFER status in case, for instance, if the GPIOs used for the CS implementation aren't ready to be requested due to the corresponding platform devices still pending to be probed. Let's make sure the DW SSI driver won't print error message in that case by calling the dev_err_probe() function if the SPI-registration procedure exited with a non-zero status. Signed-off-by: Serge Semin --- drivers/spi/spi-dw-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-dw-core.c b/drivers/spi/spi-dw-core.c index f87d97ccd2d6..99edddf9958b 100644 --- a/drivers/spi/spi-dw-core.c +++ b/drivers/spi/spi-dw-core.c @@ -955,7 +955,7 @@ int dw_spi_add_host(struct device *dev, struct dw_spi *dws) ret = spi_register_controller(master); if (ret) { - dev_err(&master->dev, "problem registering spi master\n"); + dev_err_probe(dev, ret, "problem registering spi master\n"); goto err_dma_exit; } -- 2.35.1