Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3401041rdg; Tue, 17 Oct 2023 13:36:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGl4Itp65coGqmqxJiwBeBhVEl/FqBIHWI/HxZj1qrHxP7azv7Dp1H2ZtjCGf+Qygu/5U5h X-Received: by 2002:a05:6870:1603:b0:1dc:704c:7c83 with SMTP id b3-20020a056870160300b001dc704c7c83mr3923249oae.30.1697575000542; Tue, 17 Oct 2023 13:36:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697575000; cv=none; d=google.com; s=arc-20160816; b=z6FbmeVmLMhVOkfolh/1jir6Z8dxCMCkfgeg1fPAY4jDhRG+KSX/8xblyrsjxGShJ0 FBDc6i6/hFrtoC+x37nfGsU00QaHTcGzvG2QEh58XIP10g5mf7TsnzR58UHLwD2rt3bz 0uyeDtVUgkTsYDm2AWUHzkaR8Hvv8EhJfDtpd3p/KUW+OdXYkPx35SkU8+a91WcaK1Ur 5knqUV54CvUWnUfqjLFceNJjppjxKKqyiy48tuN9y0NAeSLFnkgz5BeYCrEMbPAXGQrA BI2xL0kEQSXdo5JhuVHo8uEQoIj8Kc0U62UUVDbq1fQ24OkeaYkFumdRMxBjgYMv0BRT uNNA== 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=vEKHT0qI1+WlzdtatENWMRpkRl1UGDjdgNPMaLXpSgE=; fh=CTaLi84bbCCu0dZoVMq01fQdbp3evX0ZeU7C6O+IR0g=; b=E3C8tP6xMsj9zha1F/El69rCbM/0WvIrOZY9Aqm572vT9jAMcWgxha+Rzb+QQ8qOUL LBAHVxPCgR+Gz3lf4pT2WMSKfwULNIFVu2egJkurIMctod92wZYux+ZyY2O7DBnPXZzs 31/B5yU26cCVzZWYi3guqe5PPsCSKwbw05PkB33/90WNtSnrooQ0OHR2LVGwnHfl3UnD RA7a8gGlfopPIJT1PybXKAf1sI6m3PhHSXuDwfxeyDrPmESkxwR3Vm0TiqQBWliKg8lq 1F/RllEbKcVhB9hVKSOgL7FlpG/GZfoqPD/I40bHNql35azkBJZp411DKQjf1ttPAZIQ Vldw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id i22-20020a633c56000000b005892fd16947si535017pgn.546.2023.10.17.13.36.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 13:36:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (Postfix) with ESMTP id F323380A191A; Tue, 17 Oct 2023 13:35:58 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235050AbjJQUfw (ORCPT + 99 others); Tue, 17 Oct 2023 16:35:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234939AbjJQUfu (ORCPT ); Tue, 17 Oct 2023 16:35:50 -0400 Received: from mail-oa1-f52.google.com (mail-oa1-f52.google.com [209.85.160.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E5304C4 for ; Tue, 17 Oct 2023 13:35:48 -0700 (PDT) Received: by mail-oa1-f52.google.com with SMTP id 586e51a60fabf-1e9db321ed1so2660073fac.3 for ; Tue, 17 Oct 2023 13:35:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697574948; x=1698179748; 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=vEKHT0qI1+WlzdtatENWMRpkRl1UGDjdgNPMaLXpSgE=; b=sxQkuvsR8YlaY/nYOZVKseamN7jS8JtOLXTCACx2CcIwC7REXzMpBIJVhfEeHeQooF BjwJ8/9Q4H5in1U46AktrMWJM1r8sCpYgbm8kdnUG1+xNFpshPGt4dxx66iGeJiMy/DV VZitVdMsl47k5ZQ19ppxjuHaFMRt3nVQGSf1xibRg74UVerw8W/2FtrWpgwAr9QV1dhm 2WaF4/IBvZn9eiAJg0y4g22vDsRBfuNWgHQT6uCzQfLi+zXhfTz8TNltxedsxzzaZG8C H2sENpOGNAYNLAkJSWm7J7lhja9h9vgBERL0PLpbFlLOcaC53SH5rxfO7KDFqL32gzoG bSAQ== X-Gm-Message-State: AOJu0YzB2udS1cOrdTOLWblN9zwXjiJDO3i6IWJV2GlBdGa65dkYuc7l tBm+9/CaOkiZ5DcNCKILQQ== X-Received: by 2002:a05:6870:d60b:b0:1e9:d158:2465 with SMTP id a11-20020a056870d60b00b001e9d1582465mr3718215oaq.17.1697574948208; Tue, 17 Oct 2023 13:35:48 -0700 (PDT) Received: from herring.priv (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id ds22-20020a0568705b1600b001ea689d8969sm396488oab.48.2023.10.17.13.35.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 13:35:47 -0700 (PDT) Received: (nullmailer pid 2700551 invoked by uid 1000); Tue, 17 Oct 2023 20:35:46 -0000 From: Rob Herring To: Lee Jones Cc: linux-kernel@vger.kernel.org Subject: [RESEND PATCH] mfd: motorola-cpcap: Drop unnecessary of_match_device() call Date: Tue, 17 Oct 2023 15:35:36 -0500 Message-ID: <20231017203537.2700340-1-robh@kernel.org> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email 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 (morse.vger.email [0.0.0.0]); Tue, 17 Oct 2023 13:35:59 -0700 (PDT) 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/mfd/motorola-cpcap.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/mfd/motorola-cpcap.c b/drivers/mfd/motorola-cpcap.c index a19691ba8d8b..d8243b956f87 100644 --- a/drivers/mfd/motorola-cpcap.c +++ b/drivers/mfd/motorola-cpcap.c @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include @@ -290,14 +290,9 @@ static const struct mfd_cell cpcap_mfd_devices[] = { static int cpcap_probe(struct spi_device *spi) { - const struct of_device_id *match; struct cpcap_ddata *cpcap; int ret; - match = of_match_device(cpcap_of_match, &spi->dev); - if (!match) - return -ENODEV; - cpcap = devm_kzalloc(&spi->dev, sizeof(*cpcap), GFP_KERNEL); if (!cpcap) return -ENOMEM; -- 2.42.0