From nobody Fri Jan 2 22:22:57 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2B9C2E94139 for ; Fri, 6 Oct 2023 22:47:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233856AbjJFWrF (ORCPT ); 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 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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, st= ruct scpi_chan *ch) return 0; } =20 -static const struct of_device_id legacy_scpi_of_match[] =3D { - {.compatible =3D "arm,scpi-pre-1.0"}, - {}, -}; - static const struct of_device_id shmem_of_match[] __maybe_unused =3D { { .compatible =3D "amlogic,meson-gxbb-scp-shmem", }, { .compatible =3D "amlogic,meson-axg-scp-shmem", }, @@ -919,8 +917,7 @@ static int scpi_probe(struct platform_device *pdev) if (!scpi_drvinfo) return -ENOMEM; =20 - if (of_match_device(legacy_scpi_of_match, &pdev->dev)) - scpi_drvinfo->is_legacy =3D true; + scpi_drvinfo->is_legacy =3D !!device_get_match_data(dev); =20 count =3D of_count_phandle_with_args(np, "mboxes", "#mbox-cells"); if (count < 0) { @@ -1038,7 +1035,7 @@ static int scpi_probe(struct platform_device *pdev) =20 static const struct of_device_id scpi_of_match[] =3D { {.compatible =3D "arm,scpi"}, - {.compatible =3D "arm,scpi-pre-1.0"}, + {.compatible =3D "arm,scpi-pre-1.0", .data =3D (void *)1UL }, {}, }; =20 --=20 2.40.1