Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2498232rwb; Thu, 17 Nov 2022 11:36:11 -0800 (PST) X-Google-Smtp-Source: AA0mqf7MPuWHLhj1uRLTQQURqw4DI/5BknGJzwGxFeVA8t9QHczg54g4/e4wDsZqhY/YydcHPZ7P X-Received: by 2002:a17:907:9190:b0:78a:52bb:d904 with SMTP id bp16-20020a170907919000b0078a52bbd904mr3263159ejb.630.1668713771649; Thu, 17 Nov 2022 11:36:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668713771; cv=none; d=google.com; s=arc-20160816; b=wrkBGCgaZWU4yGAzjd3mEdxPkhsaEzktnR8OWX+/PgV39oVFNEcz9gVTmk+1LTHa7f pWRWCQMQqvV3amkBg3nyex5So0hpE8b0pwspHinjVRxf2leE+0TTnwxl9qJketBsK3MF 6l/4Zv4EPhXufYD44ExLg3LgGWQxyK97sIwMi/LAhJJSwb0h09RqCyGmNdVi/ClYo4wl j22LakfekgQXIKSkMrY4cTknQQ//kQRlFs6XeMYVUHOuTLQBtMHHZYQ4QUjxJvn2bStw VKO/P0VndJ6GtDkNQzq5VFjeWUMXMnXdNi/WPF6T+GYRRSrKf9KYHRaETGXhJGPdxyE5 jp5w== 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; bh=Rp0+8BPuJ8E8smg5sOZObB/EIeL6ON/FELSHAO9YZBo=; b=logKdVZm6yyYEh54WsZKmsle+jPGfam4vOz03FLnDpvJoubnGEFakb39KkFP0Y8Hx0 VLB6M0GApOA04+FgN0du6Uz0hH8VVvyBqDv9KJxy/5oDZwDlSKkh4S8KuKPzGCfhba7n x+uhAzUDF/KgQ4oQJ+mpMRE9tph3fFYOC6b6mAvMu5d/ZHtjInxWeRdXNQOFfyBxLZ3F mUcPtVN5OS+i6yFK4iIvblb/jh5eLKHBaMoCuD9pzDKKthEYAWyoQa+TTor4K7zEu7qk nKEYkKT8ySd45o4PgyVd4MiOJkRJweHTHLifKJKEUphJfoymyal8bhbI3fSa471FLvRA pIjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=AXY8l7YC; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f12-20020a056402354c00b004608c0b9a8asi1579566edd.201.2022.11.17.11.35.48; Thu, 17 Nov 2022 11:36:11 -0800 (PST) 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=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=AXY8l7YC; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240690AbiKQSo3 (ORCPT + 93 others); Thu, 17 Nov 2022 13:44:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240737AbiKQSoX (ORCPT ); Thu, 17 Nov 2022 13:44:23 -0500 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 528AE88FA6 for ; Thu, 17 Nov 2022 10:44:16 -0800 (PST) Received: by mail-wr1-x42c.google.com with SMTP id i12so1469616wrb.0 for ; Thu, 17 Nov 2022 10:44:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Rp0+8BPuJ8E8smg5sOZObB/EIeL6ON/FELSHAO9YZBo=; b=AXY8l7YC5VNrVrpoQhdKI9J3ad43+/giUy55N3ubiICCui4jIh7PWDBCoGiDYjLZ4w r34Iuw7JEkvUVtwFKIlEb+fqj/htEpH+Gkf3HwLq7+0GpE51rmg2+g5Rj6b1ROHujrtx SkS8pYISP3dT99/FFVmYSsXSsXXmS6xREX9vNBW99pXQd9jSRtnWOdyXGbjWMBe2yIMS 21iqHZfQ2/mVUxHw79a0FygJZamt5+u3XZ6dggfV6dq3KJTmoVKxxI/ug+uctY7PXf+j CN1fXPizYDbXL7eAWsrLvHOLAsFFpovlu1uoHUCmUgoIV5RWjLumJHmY1awclP0VDfi5 amKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Rp0+8BPuJ8E8smg5sOZObB/EIeL6ON/FELSHAO9YZBo=; b=6PaNtpkgZTjnNvbIsuRn9cNcf+5vtkTliY2e8faeF2NiIJHH29lb7IOMQaVl/pdVpp VH0vUf8enobqU7ovY6Jichx9ZUhyV1PemLalYkWbeSczkhDOwvZOdaXP5bjotkf+ZJ8k eJu6H0JwFulKBFzntLNsWmCdPVkx9Y5AxQKjay+6lsqzT2pXtOrUEjRnlBlrxZJRfU/6 0T41DPuNUJXp5A5oYZ3WOsVwE+dbd4GisB/J6bBJJ5Pb3jWlWsZS9j05kjL/TmcDDA4N cRvAJZxynyDsYvZVOR20LXzsUH+RbdBeD+RqVe/3N4IRqoZ1K9kYXw0+PGDJGB+BYcHg 4oiQ== X-Gm-Message-State: ANoB5pnSSn1Mvq5XtFITaapXeVj3eMTH/gdlfCrzKlBGG49A4AMjHvLX pZTizJoR1Pd++yfvWc2QCLPF3sXf/U1DlA== X-Received: by 2002:a05:6000:1f10:b0:241:b92f:1753 with SMTP id bv16-20020a0560001f1000b00241b92f1753mr1942764wrb.81.1668710654839; Thu, 17 Nov 2022 10:44:14 -0800 (PST) Received: from nicolas-Precision-3551.home ([2001:861:5180:dcc0:9287:74a3:4740:e7a0]) by smtp.gmail.com with ESMTPSA id l32-20020a05600c1d2000b003cfbbd54178sm11548635wms.2.2022.11.17.10.44.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Nov 2022 10:44:13 -0800 (PST) From: Nicolas Frayer To: peter.ujfalusi@gmail.com, vkoul@kernel.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Cc: khilman@baylibre.com, glaroque@baylibre.com, nfrayer@baylibre.com Subject: [PATCH v3] dmaengine: ti: k3-udma: Deferring probe when soc_device_match() returns NULL Date: Thu, 17 Nov 2022 19:44:06 +0100 Message-Id: <20221117184406.292416-1-nfrayer@baylibre.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 When the k3 socinfo driver is built as a module, there is a possibility that it will probe after the k3 udma driver and the later returns -ENODEV. By deferring the k3 udma probe we allow the k3 socinfo to probe and register the soc_device_attribute structure needed by the k3 udma driver. Removed the dev_err() message as well as it's deferring and not failing. Signed-off-by: Nicolas Frayer --- v1->v2: Extracted this patch from the following series: https://lore.kernel.org/all/20221108181144.433087-1-nfrayer@baylibre.com/ v2->v3: Removed the dev_err() message drivers/dma/ti/k3-udma.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c index ce8b80bb34d7..ca1512eb9910 100644 --- a/drivers/dma/ti/k3-udma.c +++ b/drivers/dma/ti/k3-udma.c @@ -5271,10 +5271,10 @@ static int udma_probe(struct platform_device *pdev) ud->match_data = match->data; soc = soc_device_match(k3_soc_devices); - if (!soc) { - dev_err(dev, "No compatible SoC found\n"); - return -ENODEV; - } + + if (!soc) + return -EPROBE_DEFER; + ud->soc_data = soc->data; ret = udma_get_mmrs(pdev, ud); -- 2.25.1