From patchwork Fri Oct 6 22:46:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 149453 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a888:0:b0:403:3b70:6f57 with SMTP id x8csp635689vqo; Fri, 6 Oct 2023 15:47:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGQjixVcc+NTZHt3KKArAwzete1CxNw36YQQkmzSSG6y8DBl/opaWDWKeIm0KhIMJ8xDcv8 X-Received: by 2002:a05:6a21:819f:b0:15d:8409:8804 with SMTP id pd31-20020a056a21819f00b0015d84098804mr8533087pzb.57.1696632439774; Fri, 06 Oct 2023 15:47:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696632439; cv=none; d=google.com; s=arc-20160816; b=jVn9gKGYB9lwaeyHyepstvIPTbV3qXFiPxbcWCfbv9gHUfKeynEgI+aO3sN8AHQkpZ iJ4wCJ6AwhWcb0DqTtivGWXeJfk3RxVJUIzQH3nMZr3vWWFt2VTA2sqPiZELTgHTK8UL 9bWC5xcbn3TNNovFLmZAxvm2AWA9EYDKRHCnDzY6mNn7zl0+h0w6sIDupiD/AvyX2daU tjIDGlnTuI5hd5hFhrKyQ6iamsjkoc4TxicyENY+Rl2M9vzH5cz03IbRIZ553sbyDbQQ 0dSOpy9wyW8OAq7LE8eZitM1x2mpjAiHhM3/HyRKgRqOSbUktbxhEIjROgMH7pMl1GEM MkqQ== 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=pCreK94o+jcvc5IJz9ObmcqMn2Lz11426aQB99245OQ=; fh=SqLyfzqKTQdek/Wdvhy2dUpZDKA0CG/qvba9jPeHC1c=; b=t13i1sOYXsI09dfz2pQitTv2GhItTUW6o2E/oyZmTQU2eMo1ar1ZsM0EegyW/1SMOV kYe5cGj/VhLzBqXO8a1OdWxtLNfLnbEPzeklJ7NShogawwLKLwfp1BFzxB4Qc9e2ZtNN Xtacd9u4sCFcLHY0Y/Olgp1AJbItfvrNqBD9y890g9S3A2Yvnuc2nmwFnuj9gqe6mzYB gQ0Bnv0XgVO0/cAotSx3ejD24vL5plqr+VmE2um2YtASvy1RIZYDuxE+zxAYo5pU7TPW E3kjFvoMs2UkfJAbDZlF0KiHRaZpZ9n9SPZG/wIKqVpXaxS99nrWxTFAX+0+jSdiwMoi gRog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BLamJ5PL; 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 e2-20020a630f02000000b0055be9543340si4354865pgl.872.2023.10.06.15.47.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 15:47:19 -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=BLamJ5PL; 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 B4FE58366514; Fri, 6 Oct 2023 15:47:16 -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 S233861AbjJFWrF (ORCPT + 18 others); Fri, 6 Oct 2023 18:47:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233862AbjJFWrD (ORCPT ); Fri, 6 Oct 2023 18:47:03 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2676E9C for ; Fri, 6 Oct 2023 15:46:56 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3BC4FC433A9; Fri, 6 Oct 2023 22:46:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696632415; bh=QhfxJqEQ6OJSl5IcILtNokOuYw1e3Q+5kT0sh/iU5Yw=; h=From:To:Cc:Subject:Date:From; b=BLamJ5PL9kCXURtOMy/xt58EyKrzqixFGNEjB1szGolW99SxpKzX7HN/LfbIjfU1S szhS38E7TIMHQ5S7uluKmWdZdixdRQsoqJLz8zUFKRpxBlQLv99LwcEza2AJh87sMX N3qfz+oBSuDmv44aFuqvwGWaxZF62bWM+DZo+9Uv5h+wrWsP40dehnz7l+KbFzIwWB 3XuY8g/qCULly3SXJVYddn4IwIv0aFLIg3HB933+/7nkcZWhrToPi8eDqL6h5gIvSY 7t+tzIn+HOREOO9EJMamzsRJDt4ebvhDWhFC85fJbzrjc7rdgExmYivaETLmso1NrN jd3dPkDP+hMiw== Received: (nullmailer pid 445513 invoked by uid 1000); Fri, 06 Oct 2023 22:46:54 -0000 From: Rob Herring To: Sudeep Holla , Cristian Marussi Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] firmware: arm_scpi: Use device_get_match_data() Date: Fri, 6 Oct 2023 17:46:50 -0500 Message-Id: <20231006224650.445424-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:16 -0700 (PDT) X-Spam-Level: ** X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779048057137793115 X-GMAIL-MSGID: 1779048057137793115 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/arm_scpi.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/firmware/arm_scpi.c b/drivers/firmware/arm_scpi.c index 435d0e2658a4..3f123f592cb4 100644 --- a/drivers/firmware/arm_scpi.c +++ b/drivers/firmware/arm_scpi.c @@ -26,9 +26,12 @@ #include #include #include +#include #include #include +#include #include +#include #include #include #include @@ -894,11 +897,6 @@ static int scpi_alloc_xfer_list(struct device *dev, struct scpi_chan *ch) return 0; } -static const struct of_device_id legacy_scpi_of_match[] = { - {.compatible = "arm,scpi-pre-1.0"}, - {}, -}; - static const struct of_device_id shmem_of_match[] __maybe_unused = { { .compatible = "amlogic,meson-gxbb-scp-shmem", }, { .compatible = "amlogic,meson-axg-scp-shmem", }, @@ -919,8 +917,7 @@ static int scpi_probe(struct platform_device *pdev) if (!scpi_drvinfo) return -ENOMEM; - if (of_match_device(legacy_scpi_of_match, &pdev->dev)) - scpi_drvinfo->is_legacy = true; + scpi_drvinfo->is_legacy = !!device_get_match_data(dev); count = of_count_phandle_with_args(np, "mboxes", "#mbox-cells"); if (count < 0) { @@ -1038,7 +1035,7 @@ static int scpi_probe(struct platform_device *pdev) static const struct of_device_id scpi_of_match[] = { {.compatible = "arm,scpi"}, - {.compatible = "arm,scpi-pre-1.0"}, + {.compatible = "arm,scpi-pre-1.0", .data = (void *)1UL }, {}, };