From patchwork Fri Oct 6 22:46:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 149452 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a888:0:b0:403:3b70:6f57 with SMTP id x8csp635677vqo; Fri, 6 Oct 2023 15:47:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHjemAqQ/6MshZWolxtcLWNgnbHJTpiQJ/BUBDCgXmtiLIcTlNrVbBrPARRe2rCZriAEe9I X-Received: by 2002:a17:90b:1188:b0:27b:258f:2859 with SMTP id gk8-20020a17090b118800b0027b258f2859mr7721301pjb.0.1696632437424; Fri, 06 Oct 2023 15:47:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696632437; cv=none; d=google.com; s=arc-20160816; b=Hgugb85C/pLIuJGc5zDDO8RyahInFk5QyTeA4ndkIsBLhQ/PMTKKyTmVgOs8XmHT/d YTOuFzEo9IGbFEINWVeovIa4I8RdlDj8dCRV78bkifCljvmgPEvoYl/PXaYaDceGmaXu NFhprCQ2yZiNxOekZZDqwCySRmacq1jv/HtPpFrzPr56ukkWOjt8LJMIAn3nJ1Xa9BKP EmtMxz0SU7SzfvaLzJbjbfkqmKZ5WgugFPSPUORaD2FcZ97lHWcmPhhW+aNpucugzMX3 RPs7DB9taj7vPBHVWhFmgKSUvbae6YYQ7uq0uwAMIR5+Ji1SRIrzy42agw4IVFviEEh5 hKag== 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=O6pPSPTbssEo069noL4iYy45JRBDedz+2VM6Ndkds7Y=; fh=rvkuChCZitd2rvrM3qLCcL5dlircrz5p7avshzklAeY=; b=uU+nBtl1TuMRcFnh/vBAbmhU95IIdZNUE73mhAHEGdff3S0yiGUsmaj2rJxNg5r+dX 5F1OPXoVtdiKjTg+F3/axUqhoKfcVanR3lILzh25R4NvttALEhaq11RL+jU5RPPfAPvd INrHX3eo6VUYPD4YlclgAwC9R5pQ/hk68LFY0OT+nOqoSR2E/XwdiKFKQwDgw5bCttD7 I7sz4oGzpBVtEV6393cjyTHIoohQlU4encEOLjGWQDpBg/fdUGUTyy7T+sZuanfwZ2mI gHOjZ7JeOOpuWhPgUmDa4I240Pi+gCuEtSBKRkVhzf49DRhQTI0gYA/E4rmDXoDiZxVf CrdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ONmsp8YV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id r19-20020a17090aa09300b002792c288cc2si4529668pjp.170.2023.10.06.15.47.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 15:47:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ONmsp8YV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (Postfix) with ESMTP id 42D238366515; Fri, 6 Oct 2023 15:47:15 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233855AbjJFWq6 (ORCPT + 18 others); Fri, 6 Oct 2023 18:46:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233835AbjJFWq4 (ORCPT ); Fri, 6 Oct 2023 18:46:56 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2E1FFF for ; Fri, 6 Oct 2023 15:46:50 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 10857C433C8; Fri, 6 Oct 2023 22:46:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696632410; bh=cfavBs2NTtCHh0kAyRc1/xupXHi4WKMdtxsoqtdyOWI=; h=From:To:Cc:Subject:Date:From; b=ONmsp8YV74IXZjW+Oq8zm3rJ971/oUbVuKAVC8hhouGey/N3ZLxn94lhefwSG0kuP ysLgugF4IVeOib9utIst8/7/IKnWJQX/XpIOq3ilVdeQm2g/L51WBQXFsmeY15tAb8 iv6Cxv/fnqzxWvaOdXXAUjg0rZoiUNEoYdhKVw8mjrF5rRNEfx3i3eIUReyKuT98P7 Rm2Gkoy+LaQpKfrFkpro5m9V/TP8PhC5+uSRKM0+rtloWBjwrzNATAUTs7fM1Cj4lc hnnlQL0h9pgxZKsD2dPxFfAPKNMPnzOJIq7M3jvjQvZ/dMljrB36/tp/5yulP4f4OX Rtv1xsQyeCrog== Received: (nullmailer pid 445379 invoked by uid 1000); Fri, 06 Oct 2023 22:46:48 -0000 From: Rob Herring To: Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl Cc: linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] firmware: meson: Use device_get_match_data() Date: Fri, 6 Oct 2023 17:46:44 -0500 Message-Id: <20231006224644.445295-1-robh@kernel.org> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-Spam-Status: No, score=2.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.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 (groat.vger.email [0.0.0.0]); Fri, 06 Oct 2023 15:47:15 -0700 (PDT) X-Spam-Level: ** X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779048055048082403 X-GMAIL-MSGID: 1779048055048082403 Use preferred device_get_match_data() instead of of_match_device() to get the driver match data. With this, adjust the includes to explicitly include the correct headers. Signed-off-by: Rob Herring Reviewed-by: Neil Armstrong --- drivers/firmware/meson/meson_sm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/firmware/meson/meson_sm.c b/drivers/firmware/meson/meson_sm.c index 53bf56e18743..ed60f1103053 100644 --- a/drivers/firmware/meson/meson_sm.c +++ b/drivers/firmware/meson/meson_sm.c @@ -13,9 +13,10 @@ #include #include #include -#include +#include #include #include +#include #include #include #include @@ -297,7 +298,7 @@ static int __init meson_sm_probe(struct platform_device *pdev) if (!fw) return -ENOMEM; - chip = of_match_device(meson_sm_ids, dev)->data; + chip = device_get_match_data(dev); if (!chip) return -EINVAL;