From nobody Mon Sep 29 21:15:50 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8AF0AC28B2C for ; Mon, 15 Aug 2022 23:01:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352813AbiHOXBM (ORCPT ); Mon, 15 Aug 2022 19:01:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44984 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345848AbiHOW6x (ORCPT ); Mon, 15 Aug 2022 18:58:53 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B22A9113; Mon, 15 Aug 2022 12:57:16 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 7018BB80EAD; Mon, 15 Aug 2022 19:57:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B2013C433C1; Mon, 15 Aug 2022 19:57:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660593434; bh=Thbq7Vj9En4L4hyNflAXitDCnMOycKUfIHdHJvYtZtw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=syKhYgVVZKHcpsls/ufn9l/ywnc9SLkwFM+tytaKl+nbNQ/9EmcksqFejL0wfcquv nLiuXnw2l8d9u2f4oclD2qMcTWpGwdwhA9gocaQAULC1P1GLy5azpT8Fdb0qpyBtj1 a9rqWYOKnIQqJqOhFoXr5Zw76rZ0qjQopMlSby10= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Andy Shevchenko , Mark Brown , Sasha Levin Subject: [PATCH 5.19 0267/1157] spi: Return deferred probe error when controller isnt yet available Date: Mon, 15 Aug 2022 19:53:43 +0200 Message-Id: <20220815180450.287995036@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Andy Shevchenko [ Upstream commit 9c22ec4ac27bcc5a54dd406da168f403327a5b55 ] If the controller is not available, it might be in the future and we would like to re-probe the peripheral again. For that purpose return deferred probe. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=3D215993 Fixes: 87e59b36e5e2 ("spi: Support selection of the index of the ACPI Spi R= esource before alloc") Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220709212956.25530-1-andriy.shevchenko@li= nux.intel.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- drivers/spi/spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index ea09d1b42bf6..62aa3f062f3d 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -2398,7 +2398,7 @@ static int acpi_spi_add_resource(struct acpi_resource= *ares, void *data) =20 ctlr =3D acpi_spi_find_controller_by_adev(adev); if (!ctlr) - return -ENODEV; + return -EPROBE_DEFER; =20 lookup->ctlr =3D ctlr; } --=20 2.35.1