Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3028388rwb; Mon, 15 Aug 2022 16:26:51 -0700 (PDT) X-Google-Smtp-Source: AA6agR675FYKSol33XIMMyAvgGJY2fBjyqXfWeZw31/mYzpjnFvLtFkwwbOeme+hf9nqnxy8OfWh X-Received: by 2002:a17:902:da92:b0:16e:f4a4:9f93 with SMTP id j18-20020a170902da9200b0016ef4a49f93mr19171512plx.27.1660605903841; Mon, 15 Aug 2022 16:25:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605903; cv=none; d=google.com; s=arc-20160816; b=ykuEkju+1b/78P9vi2+nxPbOwDBQsPaGhn9nE7eJZN09LTizOTBqmVP8f2F05YrOMp jFvYd355VwyBE2PgcmP5c12OWpRcZ96R9vOxmPJYUfOjgnJc4ESoNOYXGuua73Jxyb02 OqeNeAtJdSPasbcMmFos1f4/Ou1deNSfFmY/fb//F5ZrK8jVKCQaZZQO+rOd6QTY2hA7 gMfa9S9lOvs0A9UiCxiawhCuKVbh70fla/bULQuynU/tI7YBnnLMkMUNBg5Ut1iQq23a f6jU6mLioWUgq356T3mt4W3jK8m5pgg+hV3Bz0uZAwJH8UYO4+e2eyOV1zHZ0vkGBreP n9Cg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=PL1iDjDrFf0p4DjmGIdvy1qI79QqHPiK2AEQY1brFqc=; b=Cjs47zNdGCZcdAbWjnxt/mMcZKDptRBY6PYLcFXPbL+pjjzXlpurw4R8aXLjgZkoIr b0mXeX6/ROqtmL/6LRw2ZSloLOXAyjHC3DFD2kUoNfcFc8QF8f1FnXQ6horZN4qW7BRM pTW3weAHWXt2zlLrEGzE4C82HeJjNGJcG0JB0ddAJ2QTc/ONAXW+h+0eDfcm70iOue2Z mfQ0AjlhkItBASmnGbtCkTcJkKRswwP2CcLT9mTNBLKCKiW+h190Ykz6IP6XybnoH5jd FRe6RTqSLItUg5rVSdnrez7VYVDdYCHTthF5NHC6fAH1RhX5zobrqhN1TKvTX/s+sI+y NXog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=syKhYgVV; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 84-20020a621757000000b0052ac8eee909si10196288pfx.300.2022.08.15.16.24.50; Mon, 15 Aug 2022 16:25:03 -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=@linuxfoundation.org header.s=korg header.b=syKhYgVV; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352805AbiHOXBK (ORCPT + 99 others); Mon, 15 Aug 2022 19:01:10 -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-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 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=215993 Fixes: 87e59b36e5e2 ("spi: Support selection of the index of the ACPI Spi Resource before alloc") Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220709212956.25530-1-andriy.shevchenko@linux.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) ctlr = acpi_spi_find_controller_by_adev(adev); if (!ctlr) - return -ENODEV; + return -EPROBE_DEFER; lookup->ctlr = ctlr; } -- 2.35.1