Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp677883rdb; Fri, 6 Oct 2023 15:47:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH6QDx0js7b+Y0/T+Igc/y5MhF5ZTk4rYWAKR73t47zbw+j7Lr+FIGHEhLkSA0iIWwJxPUj X-Received: by 2002:a17:902:b909:b0:1c7:2f33:7ccd with SMTP id bf9-20020a170902b90900b001c72f337ccdmr8680748plb.33.1696632430331; Fri, 06 Oct 2023 15:47:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696632430; cv=none; d=google.com; s=arc-20160816; b=nWXBrdQ15rCxHelGHt6a7uN9KjXCtjqMFd61Kz8kb+icnR+FXqp8Tqiq1za6KuQ9Wn 5EgT1I8xu3cBJXXKYF6lQLSEgIHLxt0Po2JtfD5WtKXaWK+5n/x7esSGCdLoBiNIx7a8 1qiDPhmyf5YLOidCivsJe4qb9ohzRgMSD4SyPPGp2WqotXMjZCyTZ/8sxmweNuStCx0y aflGbjrCRhYQJE95XF0bs/cH/8TKPigI/ay2C9fZEMtzbHcAQFjRXy3j3mtIjfRqLSIM tIl3IWsB7TiHXU9ZoI/gnri/EhY7TQ8FSmX3ram8MF8Su6p2Qg1JwBNgkvtYOAfn/OnI gCmg== 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=mmi7IP2Ogu3Ao1QMiK0X5ewbS+YcKFTVX47BvcNdlOc=; fh=0Gsh/DBtucoqAnSsXwQzmicRm34qIFKFIc7xX+GEJ8w=; b=bHBB8mZlj8EDmJAWbAWCuErZRPtARZaraXQXHMMcOtdxZSaXcl+qpvvpFAP7rfLNYJ AqCbSDO8fjyNSXftlrkJfgU7RXucF0ZeHMh/bzJeGxeTQZPLJi9WvvJYWnafg/juzrwc 4vBjMlD58tATyofrXOUv0XOxtbwbSbtWhkbC8TtKzQAuV7gTRYhNnM6XochuAaeuWNec Z46ZPbekTZ9x4WCgX+wgHXgd3nY+UInaLuHjMWUF+ulb1MXwznNrAElGiOLFlRcIxSQM 2Q+gZAhuxluW/v0+VykS8EEfX0+/w6Sq66PE2EyFkzY4RG1obPSpeg1l4P3kWzAICSyM qSQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AWYuR7fS; 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 Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id l13-20020a170902f68d00b001bb3316f71dsi4968566plg.481.2023.10.06.15.47.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 15:47:10 -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=AWYuR7fS; 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 974558366514; Fri, 6 Oct 2023 15:47:05 -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 S233811AbjJFWqv (ORCPT + 99 others); Fri, 6 Oct 2023 18:46:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233864AbjJFWqs (ORCPT ); Fri, 6 Oct 2023 18:46:48 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B93AFCE for ; Fri, 6 Oct 2023 15:46:44 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A1BB7C433C7; Fri, 6 Oct 2023 22:46:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696632404; bh=++louF5zar/N7pGJEhjOVXx7naXu/aElGi4NS4dLdJs=; h=From:To:Cc:Subject:Date:From; b=AWYuR7fSyxHedykT0mdgRFTtMgQ6N3hsjmaI9JoqFPM6wd609MqD8cAtlv2Muy6jc ijTHCeA2vNr8b8KLqcrxWBkciYjX/ERhKovSQMWjBlA02RmM53ySiZ+kysd0TIRpwZ C3FMsibEdglvlCVjh4gDyk44ROO/rSdtrhI/PAQC79YgQpU3ocHHGmbYTIQJWcOJL3 zzuECx3i2Pp5QZ6XofhgTb5joIuFDwepdy/vxNC4hIeFPBM7DSYpfK0W2k4nLhDB98 TbEUt7wSTH0uv9TnW5sNABWwTlC55r0xzmyJdxCzetFIu3CC3JkNIs/EUfM5sAgNUM +ESXzN/cTU9ZQ== Received: (nullmailer pid 445257 invoked by uid 1000); Fri, 06 Oct 2023 22:46:42 -0000 From: Rob Herring To: Nishanth Menon , Tero Kristo , Santosh Shilimkar Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] firmware: ti_sci: Use device_get_match_data() Date: Fri, 6 Oct 2023 17:46:38 -0500 Message-Id: <20231006224638.445168-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: 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:06 -0700 (PDT) X-Spam-Level: ** 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 --- drivers/firmware/ti_sci.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c index ffca636cc13f..7041befc756a 100644 --- a/drivers/firmware/ti_sci.c +++ b/drivers/firmware/ti_sci.c @@ -16,7 +16,10 @@ #include #include #include -#include +#include +#include +#include +#include #include #include #include @@ -3293,7 +3296,6 @@ MODULE_DEVICE_TABLE(of, ti_sci_of_match); static int ti_sci_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - const struct of_device_id *of_id; const struct ti_sci_desc *desc; struct ti_sci_xfer *xfer; struct ti_sci_info *info = NULL; @@ -3304,12 +3306,7 @@ static int ti_sci_probe(struct platform_device *pdev) int reboot = 0; u32 h_id; - of_id = of_match_device(ti_sci_of_match, dev); - if (!of_id) { - dev_err(dev, "OF data missing\n"); - return -EINVAL; - } - desc = of_id->data; + desc = device_get_match_data(dev); info = devm_kzalloc(dev, sizeof(*info), GFP_KERNEL); if (!info) -- 2.40.1