Message ID | 20231006224644.445295-1-robh@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> 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 <rfc822;ezelljr.billy@gmail.com> + 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 <rfc822;linux-kernel@vger.kernel.org>); 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 <linux-kernel@vger.kernel.org>; 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 <robh@kernel.org> To: Neil Armstrong <neil.armstrong@linaro.org>, Kevin Hilman <khilman@baylibre.com>, Jerome Brunet <jbrunet@baylibre.com>, Martin Blumenstingl <martin.blumenstingl@googlemail.com> 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 Content-Transfer-Encoding: 8bit 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: <linux-kernel.vger.kernel.org> 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 |
Series |
firmware: meson: Use device_get_match_data()
|
|
Commit Message
Rob Herring
Oct. 6, 2023, 10:46 p.m. UTC
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 <robh@kernel.org>
---
drivers/firmware/meson/meson_sm.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
Comments
On 07/10/2023 00:46, Rob Herring wrote: > 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 <robh@kernel.org> > --- > 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 <linux/io.h> > #include <linux/module.h> > #include <linux/of.h> > -#include <linux/of_device.h> > +#include <linux/of_platform.h> > #include <linux/platform_device.h> > #include <linux/printk.h> > +#include <linux/property.h> > #include <linux/types.h> > #include <linux/sizes.h> > #include <linux/slab.h> > @@ -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; > Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Hi, On Fri, 06 Oct 2023 17:46:44 -0500, Rob Herring wrote: > 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. > > Thanks, Applied to https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux.git (v6.7/drivers) [1/1] firmware: meson: Use device_get_match_data() https://git.kernel.org/amlogic/c/5d59b6a49bb8f6841acf53affc0c4720fe7450e5 These changes has been applied on the intermediate git tree [1]. The v6.7/drivers branch will then be sent via a formal Pull Request to the Linux SoC maintainers for inclusion in their intermediate git branches in order to be sent to Linus during the next merge window, or sooner if it's a set of fixes. In the cases of fixes, those will be merged in the current release candidate kernel and as soon they appear on the Linux master branch they will be backported to the previous Stable and Long-Stable kernels [2]. The intermediate git branches are merged daily in the linux-next tree [3], people are encouraged testing these pre-release kernels and report issues on the relevant mailing-lists. If problems are discovered on those changes, please submit a signed-off-by revert patch followed by a corrective changeset. [1] https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux.git [2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git [3] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
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 <linux/io.h> #include <linux/module.h> #include <linux/of.h> -#include <linux/of_device.h> +#include <linux/of_platform.h> #include <linux/platform_device.h> #include <linux/printk.h> +#include <linux/property.h> #include <linux/types.h> #include <linux/sizes.h> #include <linux/slab.h> @@ -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;