From patchwork Wed Nov 15 20:59:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 165601 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b909:0:b0:403:3b70:6f57 with SMTP id t9csp2808886vqg; Wed, 15 Nov 2023 13:02:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IGXzLsdLRPThR8tPI+LRcR0iS4eGnC047vVaMqyCmUDU+gw3NlwYo0wieqMD8KdoTeEifUf X-Received: by 2002:a17:902:bd4c:b0:1bd:ca80:6fe6 with SMTP id b12-20020a170902bd4c00b001bdca806fe6mr303230plx.41.1700082144568; Wed, 15 Nov 2023 13:02:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700082144; cv=none; d=google.com; s=arc-20160816; b=iCsE5v2F/FbRz5Gibg9KP28vWxNtboucrC0Yty+8r/41JUDsunTgmOQrrU5j6CFUM2 xcqsPMhnHgNywWckRXai24jsHf/Qy+LQVxU1voecr/NZWco2747j40i/N35N+A7fprSs IVFFfVF0n/UJSLULiwjK0d/J0yM2DITFtPksP7FkB8m1LAfO5gETgf2miwE1Zbj1sVZW hSrzERSAV9EFY3cFtyhPiIFd4/e3RI5ydFPIWOV8Term/dTA0L35Fwy5acVTkvCpOHr8 peGr5lbUt9l/8XU81HTJuTIdgedwMjBtnkMgD6Olb6BZ9rqP2heQ5Y/MK/rP280piwtO Nhtw== 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; bh=yeu2Yqk+1W7JwaGj7n+VfzHpUfLi9VX9pa9cQ1fxjWY=; fh=7EeIR8NUPPGD3N88M96BYTMLNfS3mAYntn6p+zm8Als=; b=csF28TfAvgZ4IjvMCZyx5vxj89UqXmuZnJn8x+bp74NLRhwoln79AVMLyUDzLqR5We yJeL0ZycRD8kvwAA14rHnafJ7wvn1EzrE8guLdYlkrgLjs4jhAnmKSPMdqfUwuyZxpH1 gy08DfVOMcbtt9BB53oQube+dDjJF7dTCeE5ztKk/YuU+Fr3e9ROzEFCrKPKEuMB/Zn3 OjtAPOEY4pHY2cBr/hIM/9C9STiYkmybDrn9/om8YleFbFWN63CO/1PvDxLTrDcEF6Ex xCaOauQuYloTmQEM+tU9Gf2cOnt59aL3ZZmwkWQhRmdp/QlwiFLsCXhBqKtUZOdwEHY9 83PQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id jc11-20020a17090325cb00b001c589ba4a04si10345802plb.24.2023.11.15.13.02.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 13:02:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 61912804E795; Wed, 15 Nov 2023 13:02:21 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344781AbjKOVCG (ORCPT + 29 others); Wed, 15 Nov 2023 16:02:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235721AbjKOVBr (ORCPT ); Wed, 15 Nov 2023 16:01:47 -0500 Received: from mail-oa1-f52.google.com (mail-oa1-f52.google.com [209.85.160.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 320841BE; Wed, 15 Nov 2023 13:01:11 -0800 (PST) Received: by mail-oa1-f52.google.com with SMTP id 586e51a60fabf-1f0f160e293so32769fac.0; Wed, 15 Nov 2023 13:01:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700082070; x=1700686870; 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=yeu2Yqk+1W7JwaGj7n+VfzHpUfLi9VX9pa9cQ1fxjWY=; b=RhMvEzt5IUz2v91D8lzduKZ7XBmVYgUAQtUDFUJqci8WwCkfY0eapyiCJxw/Ve1S9B 7kfQSGA82DWQ8sp+zVgR/RgpkptUhjjtyn4FOMsKkRX6EMFndKlG5AZTNYpfDdZ6JPQ3 Po5Po48rK+wSH9q/Ea5mKXb+PPPyGy8WqspvDvwiL0fJuTQEuffnALziWBVbHwpLPR+X rN+kBcWFNs0MSZktyokhLSHSncuVwv9HjYNU/wUFAiSOsF+GZnErI9HsCW0bqlbyBu14 fxx+xFU8T0qE9Gi6+13BLQVaCWjRAqFVmlf3TUjTk/32CmiiF7cjKjIKBtAKgvZfbJOh rUQw== X-Gm-Message-State: AOJu0YyoQPqqsdXDJ49ARN0us7C0wtVYLBgA+l7iYnZuddfTDELcljoP ZcY5ElGBzGFwZaeXUj8dig== X-Received: by 2002:a05:6870:c1d1:b0:1e9:c18b:b2da with SMTP id i17-20020a056870c1d100b001e9c18bb2damr18542152oad.18.1700082070487; Wed, 15 Nov 2023 13:01:10 -0800 (PST) Received: from herring.priv (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id bs14-20020a056830398e00b006ce1f9c62a1sm692803otb.39.2023.11.15.13.01.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 13:01:09 -0800 (PST) Received: (nullmailer pid 3738084 invoked by uid 1000); Wed, 15 Nov 2023 21:01:08 -0000 From: Rob Herring To: Hugues Fruchet , Mauro Carvalho Chehab , Maxime Coquelin , Alexandre Torgue Cc: linux-media@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [RESEND PATCH] media: stm32-dcmi: Drop unnecessary of_match_device() call Date: Wed, 15 Nov 2023 14:59:04 -0600 Message-ID: <20231115205904.3732985-1-robh@kernel.org> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 15 Nov 2023 13:02:21 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782665334895816326 X-GMAIL-MSGID: 1782665334895816326 If probe is reached, we've already matched the device and in the case of DT matching, the struct device_node pointer will be set. Therefore, there is no need to call of_match_device() in probe. Signed-off-by: Rob Herring --- drivers/media/platform/st/stm32/stm32-dcmi.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/media/platform/st/stm32/stm32-dcmi.c b/drivers/media/platform/st/stm32/stm32-dcmi.c index 8cb4fdcae137..48140fdf40bb 100644 --- a/drivers/media/platform/st/stm32/stm32-dcmi.c +++ b/drivers/media/platform/st/stm32/stm32-dcmi.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -1890,7 +1889,6 @@ static int dcmi_graph_init(struct stm32_dcmi *dcmi) static int dcmi_probe(struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node; - const struct of_device_id *match = NULL; struct v4l2_fwnode_endpoint ep = { .bus_type = 0 }; struct stm32_dcmi *dcmi; struct vb2_queue *q; @@ -1899,12 +1897,6 @@ static int dcmi_probe(struct platform_device *pdev) struct clk *mclk; int ret = 0; - match = of_match_device(of_match_ptr(stm32_dcmi_of_match), &pdev->dev); - if (!match) { - dev_err(&pdev->dev, "Could not find a match in devicetree\n"); - return -ENODEV; - } - dcmi = devm_kzalloc(&pdev->dev, sizeof(struct stm32_dcmi), GFP_KERNEL); if (!dcmi) return -ENOMEM;