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 (Arm)" X-Patchwork-Id: 13457363 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3FD26C2BB3F for ; Wed, 15 Nov 2023 21:01:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=xPjJsiB8dUnLdLXCfzerN6XSd3izn4KVBcAsJfKy4wE=; b=uN0yvJuOC0xVA5 qMMrzM22LDtDZzOibDCAT79c1BQYoVlOG9EN83sNPRyrKbT54TK73nwRwlIWAyXKLBsaDNnTgXBxk DxWBoycbAY2efxleRMeCRhzMgiOXwYR4mQn0mQnVGotwrjpxXkfsp7Gq4svg0p5p8EaxTID5GYVeh HrwfzbYdGxYQP1D2gpsrAws08HXSgY19rcmc28lmMpoq7RmOSbD+wM7DdeJNy6vF6WK7zB02k0M/A BQqsMrNR/nt7CMQ7tIV8437aZmBrOz7C0NKoQJaxwJ6MdHTR5OvN067Enq7hy3NzKILMmCEluvipV eY5e06UTrf55RC/EsxJg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r3N0d-001ixi-1v; Wed, 15 Nov 2023 21:01:15 +0000 Received: from mail-oa1-f46.google.com ([209.85.160.46]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r3N0b-001iwh-1m for linux-arm-kernel@lists.infradead.org; Wed, 15 Nov 2023 21:01:14 +0000 Received: by mail-oa1-f46.google.com with SMTP id 586e51a60fabf-1f060e059a3so25861fac.1 for ; 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=V7fvf6PnJYu/7Kst6nb3P5z2x0ty5NA6GMfXY8vlt0KrjaOVY8ThbYh63EYkMN6L/C iokgrpaGjLg0NyNC3E8svN4tvnWbs7ZrgMYxVeXafq/9SEuZhLkDcRVroQ0Gcn/cbHMl C6p62qT6Czl4ekUHjm6cYYi/zALkAX3c6tuAnpuZs4JVxxrBTI0DOkzHSr3tzBRtFPkk upiTAobVnu6Ovzpg6A8Gd3Ea4l+6CHkJoe46tVRIpE4ILoZLsmCVR50s/SJcVXgPoG2d 5W+623Erv0VgMW10kF6PNvzAQKoxAuBWcoaG++WZMkZg9ENJHQp+ptvLci1037p5GYGv rP2w== X-Gm-Message-State: AOJu0Yx7JJDjqeQKvKfeSkfH8UgafRbtpBsk3aNwUGTq2utxpV92tx/T jhjqmTFpNwnSfVsbtZ1z3Q== X-Google-Smtp-Source: AGHT+IEVvxd3MCaCvVBahCTroW9oJyYWp33cFwoR5qhRxQiQVxo5B8PsmQhF/yPdTGut1NK8vIwcew== 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231115_130113_597797_9B5E2691 X-CRM114-Status: GOOD ( 13.99 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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;