Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3026113rwb; Mon, 15 Aug 2022 16:24:10 -0700 (PDT) X-Google-Smtp-Source: AA6agR5MLsIaZ4kNQW+3yoIK61mwWPYGITo0Ix8yiISRWO56TBzeXm1rhDTmfVZNE+HTayJ2OUS/ X-Received: by 2002:a17:903:2611:b0:170:953d:e03e with SMTP id jd17-20020a170903261100b00170953de03emr19736399plb.49.1660605850226; Mon, 15 Aug 2022 16:24:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605850; cv=none; d=google.com; s=arc-20160816; b=iQ6BdV/niAuVvyHGAfMT3xa5EhuSPeoGa96xxc8K27TcZWV71HHyc7an68hKgs+Lz0 mtQ2B0F3emRy4tGaW9tc6FSuSW3YD+OElWkHHwm1WIXQcoUx0dt0kxpw6ZpsrJfAqA5/ piiV7IWAeDyS9yrIm0X5O7dH7z56l0zgMc9Uj3FVCZGjgvZNDd2r62pmXOkcyuugBn4T +6SWp8BVE69mQBhW4IfNQxbKqHDxa7EfdyN4RvW9a7wx8HnV7qLwwzJErzGr7W3rUl25 9TuKjd4Vtwl5UOLtCDOBQfsMG3s/QDULKyHfG+09XzC4qx9LGQtcrPv4+4ayA78uBHFO aBOQ== 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=bSXHYGG/LrRCNqwKKTAY96EPVs8Nx/Ix/lgjC0aaORo=; b=pIgUIohDQjwQ/SE/+M3uV1S5/NH2tU3gvphUfDEq6XdyirXMHYw8eb+CxpiZI5poge I6gNV2U7hHvwH/6JfgekKRM1ttiKcPr0ah3bEuseIF6JebT9ujdA5lEw3lwcU1pSMJFZ OrN8VsnYRl8PpovghtjDeiRmeke4jZuGKQB6jnO3uTrCcfVzb/AYDnELPk+qp8voU7Ot 6k1OrZPc8gubPLAcPVLupPcCY5Yrte+TCZaIWRDAnRInQRhak35dXvKawRW9vuZ5fQIv jVrQl4XtrR8EYILf9Cpt0awYHUjhxEvS/TeE9RASyVL+syV9xjQrftcLEUhUm82XSXdc V6kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=V4gajcr0; 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 l14-20020a170903244e00b0016becaaa23csi13683470pls.434.2022.08.15.16.23.59; Mon, 15 Aug 2022 16:24:10 -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=V4gajcr0; 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 S1346012AbiHOUuU (ORCPT + 99 others); Mon, 15 Aug 2022 16:50:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245187AbiHOUt1 (ORCPT ); Mon, 15 Aug 2022 16:49:27 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7785B958F; Mon, 15 Aug 2022 12:09: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 dfw.source.kernel.org (Postfix) with ESMTPS id E031260ACE; Mon, 15 Aug 2022 19:09:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DAEB0C433D7; Mon, 15 Aug 2022 19:09:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660590555; bh=t4VfIFbTd+hOKtBrkZrnhvdPwL/KK5ZpeGv/LvfhQqk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=V4gajcr0VIqq6ErcuZ3hlPM5xE0sC4vr8EmYAjGqWoS1W+AxUAdEI6MvnnvgIVLKG tjzEMvEmH6LTQiugzDchmbfvKVIYOMrljIGo2IX5rAoCt0mvx4OGF5Tac22+L3O80m U64nsDjwslKGK1FCae+dMJPOxYx6AlJe1trfelGI= 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.18 0266/1095] spi: Return deferred probe error when controller isnt yet available Date: Mon, 15 Aug 2022 19:54:25 +0200 Message-Id: <20220815180440.746497365@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@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 2e6d6bbeb784..e1065768c537 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -2416,7 +2416,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