Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp2142828rdb; Mon, 9 Oct 2023 14:14:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE8MIIvPMSfpRsJ1F0BhIawaCH0E7WWyIXSFki50j3cEk5oFQuv0EUCqWztlcbbfmw2Vd3p X-Received: by 2002:a05:6a00:2283:b0:682:537f:2cb8 with SMTP id f3-20020a056a00228300b00682537f2cb8mr19667952pfe.26.1696886090814; Mon, 09 Oct 2023 14:14:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696886090; cv=none; d=google.com; s=arc-20160816; b=uMGtNrnNZmf2XUUT6Mww1A9F637XEmY67N8yXwJBAQZyrD3L45SN6XSGSvOgJDak5+ 2JpwIWnvKjrKZT/0Qy+xcbUk3lWfxKHX1INpZODch3bJIvw2GbVDVqsFhLyW7PzApdGY OROkIOskE9DdUgd2DVD9GeNT3ddtBomDxw5MMOXh9/4Yf4bsUjHe+E/nYM0EJ7020zSb SjNywLRQH5itJ+kGNhIFunFrp/JHLjpdZpJjSbFuqMnM3nMNY8IN6+DF7CjqxYSUn53t wM2u1OAsAW/hAqKz8Mkxsw+KwSwNHN+vYdBxhM4+SyDqyPQ+aOP3sZXz7cEVlMHLOc4E F8Wg== 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=gH5Y/YshvnQC8GBWzqfxN8LapAs03YTswct3FVR/yfA=; fh=Mw463kIC3h75PEl5AD8/7aSAymk6dU4cGZKDm03AX8c=; b=wIRhmaGR2FMmicRKV3SpLaBUxf+mC8fzgm9u83vQWoEOUN/HTd5kuVs/K8XyX4Cifn 7dkwv07csxRxc1eyIvytVYoi2iDQ24we41VYeqnsCrp7Vq3Uo3dUSXspIpLTaUyeUhag A6NVW6YwhSzEVKJPcSetPk7C5pMEvwCOsHYomRS58TAtKK3wxGED4hx3/FaIjV1i9OTG oyIhCWoJjQqENUU16XhtyedyJ2nDopvxAE9MkCCsJeCCto13NBweybgVeXhWnz0tHQOH fdCrzwonb6TKkTCOBqiEPvLFdftab5zOUUihJlue80z7bcLPbocvWB1FlwfS2IQBlfN9 7h9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nLmGy1oz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id z17-20020a056a00241100b0068e3f550763si8393029pfh.101.2023.10.09.14.14.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 14:14:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nLmGy1oz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (Postfix) with ESMTP id 091BC80E7102; Mon, 9 Oct 2023 14:14:49 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378724AbjJIVOi (ORCPT + 99 others); Mon, 9 Oct 2023 17:14:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378711AbjJIVOa (ORCPT ); Mon, 9 Oct 2023 17:14:30 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA70AB6; Mon, 9 Oct 2023 14:14:23 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 95544C433CA; Mon, 9 Oct 2023 21:14:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696886062; bh=XqIqec+pw9iYlZMOI9gBZnvFzmC89KjXzQC2GvxygF4=; h=From:To:Cc:Subject:Date:From; b=nLmGy1oztAI1senaE9kaG+07yEaCgj31xYXfkt/5QbxmORxl0rC4BWcy+PopIxu13 AiDE2qSrE1Kgo8ZxiutfMErLbDT3xCIYwNlaI0r4LALfZ6l8BSQb1OZKPy+FU22p+Y 4H4kJcaOIduuy1JkYgOvh6rpbH9YlNZFH8vnGtuWaXy6OXTTcbNvyqArCXy6I6GqEo rvds4LLWICwDTz023QYdgfKmFcWRUy4sGoHnK0ZmN5I0U8zfpW4TT7Lh1tXRbvP7aK CXhlgeQGKv6rgR6f+OjV4MoO6XztZx2LQNPu/3MjEddl22nODF+32XBom0OA+chqNd SY1KpwqPV2J0g== Received: (nullmailer pid 3246018 invoked by uid 1000); Mon, 09 Oct 2023 21:14:12 -0000 From: Rob Herring To: Patrice Chotard , Bjorn Andersson , Mathieu Poirier Cc: linux-arm-kernel@lists.infradead.org, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] remoteproc: st: Use device_get_match_data() Date: Mon, 9 Oct 2023 16:13:40 -0500 Message-ID: <20231009211356.3242037-10-robh@kernel.org> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Mon, 09 Oct 2023 14:14:49 -0700 (PDT) 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/remoteproc/st_remoteproc.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/remoteproc/st_remoteproc.c b/drivers/remoteproc/st_remoteproc.c index e3ce01d98b4c..b0638f984842 100644 --- a/drivers/remoteproc/st_remoteproc.c +++ b/drivers/remoteproc/st_remoteproc.c @@ -16,10 +16,9 @@ #include #include #include -#include -#include #include #include +#include #include #include #include @@ -341,7 +340,6 @@ static int st_rproc_parse_dt(struct platform_device *pdev) static int st_rproc_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - const struct of_device_id *match; struct st_rproc *ddata; struct device_node *np = dev->of_node; struct rproc *rproc; @@ -349,19 +347,15 @@ static int st_rproc_probe(struct platform_device *pdev) int enabled; int ret, i; - match = of_match_device(st_rproc_match, dev); - if (!match || !match->data) { - dev_err(dev, "No device match found\n"); - return -ENODEV; - } - rproc = rproc_alloc(dev, np->name, &st_rproc_ops, NULL, sizeof(*ddata)); if (!rproc) return -ENOMEM; rproc->has_iommu = false; ddata = rproc->priv; - ddata->config = (struct st_rproc_config *)match->data; + ddata->config = (struct st_rproc_config *)device_get_match_data(dev); + if (!ddata->config) + goto free_rproc; platform_set_drvdata(pdev, rproc); -- 2.42.0