From patchwork Thu Nov 17 18:44:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Frayer X-Patchwork-Id: 21872 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp564060wrr; Thu, 17 Nov 2022 10:45:51 -0800 (PST) X-Google-Smtp-Source: AA0mqf7+SMjcXe+RqWIgXX9u7Qja2NiDD9/wuGT+71Xv0INmVgBJoCJjWfds3FHhNk1V91xLRYN+ X-Received: by 2002:a17:906:480b:b0:78d:9f25:6103 with SMTP id w11-20020a170906480b00b0078d9f256103mr3271966ejq.168.1668710750794; Thu, 17 Nov 2022 10:45:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668710750; cv=none; d=google.com; s=arc-20160816; b=Pnjq1/TmG5S3eJqHc6UBBq79p1zpvAvXIsLHVRdwxi/YFrXsPwCFYWRjPZ0VzBkt7O 9QOO0PL+D8wM9a+/rrLEVwjCOBnijbcnmC5iIbqM4reL/q0nbK4gRqyQ14h+gkd0APIN gLSflnMUYg08JemrPeZtfPlWfYM0NMnDdYNJp1nXjVCCkdFtKflamqeI1Ng8ViPKTBvY iUFjhvgvRNEsBkSDLpI/m8iGn3TaffVRgU/W7+j61m7RJcBZmdhQB1gD2LcSki+Vg6Yl 60Zaw3VxDk9SuHFiALPoZXLDiXrtFuhkJfcxppMnU3x7PvYsmW+kZfdmEI9C/DXxOlD/ X6Iw== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g23-20020a170906349700b007ad69eba328si1005800ejb.539.2022.11.17.10.45.25; Thu, 17 Nov 2022 10:45:50 -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 + 99 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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749770044250770868?= X-GMAIL-MSGID: =?utf-8?q?1749770044250770868?= 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 Reviewed-by: Kevin Hilman --- 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);