From patchwork Wed Nov 15 21:01:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 165603 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b909:0:b0:403:3b70:6f57 with SMTP id t9csp2809129vqg; Wed, 15 Nov 2023 13:02:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IFQ8USoQadiO8zEy7sD8sgJZYCGvLmv4nI8yYYJYWRvn5PF5xZ1W66mBxtSuSyl1XKxiQg9 X-Received: by 2002:a05:6a00:2e13:b0:6c4:e7a0:af30 with SMTP id fc19-20020a056a002e1300b006c4e7a0af30mr14458315pfb.25.1700082166395; Wed, 15 Nov 2023 13:02:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700082166; cv=none; d=google.com; s=arc-20160816; b=DyUkueveFD+8ZA7pfurigr9aBdTwKtny3+l71iSIqVLoX0nWXm2acrhtW3DwudVGPK bnr1GMDO1pmv3M3NYe/PHGKpGRRr3jL2EEa+1ydc/5EpaoppsRF3tgVGvPvdhYxDDfE8 pN1kdDm6DfF03i0ptwZ/p7N8O7rTu04zSh9oSigmtNMk06VfAOJV2I1PKJTEZ85cFk87 AVWh+aFGjme7swt6c+cNUkOS5qTT+s0toPF8srEDk83L9AlIua4Wa0nstakwEjW8ZT55 5Z+7uNKjFOyTNUIxtvNDSTMVK4ogWDUSd+v9VJyKso6hUmLyZGxcHDHrcJPZnicIRzHF 2PaQ== 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; bh=RCg6f5/T02V1q5il/uuEVJCsez595XWmMuk/ZZxOjtI=; fh=SubvXZJN7EVhuhIEVVujNVZadt5rNFp0wHydOiwO6mA=; b=oGKaxaAq3yU1wu8YLL0TxBeCxsbfa6d0UlUM6xNjlKzIzPIQUdw9pjf78e418ZvyH3 22OA9okyc2wyQdJ7fDeLTJHCt7afrk/xmhPxsYkKyC7VwdZg79R2VYZEBDoePV/yF9V+ JP6FnJVVhU+2n69eE/p1wnHUOr21iHwfSE5r23T8eYjpGO6oS0c9OoM4S4/18Gc42fgZ F+Qic0RKxPL8YXq6F1iikV+yGLhOvZAo+ltqz5NNQ2bc6D5d3mSvIbUwaNhPTYOXetHc 2U/GjTuYxc8BdVTTWMEofpXrmAEz0++wdGlOAd1DzmNVpC8fuKdwlq0T/+OEd4Z30Iw8 g1Ow== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id w7-20020a056a0014c700b006be1d2ee8f9si11478753pfu.224.2023.11.15.13.02.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 13:02:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (Postfix) with ESMTP id 6805880873A8; Wed, 15 Nov 2023 13:02:40 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235065AbjKOVCS (ORCPT + 29 others); Wed, 15 Nov 2023 16:02:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235754AbjKOVBv (ORCPT ); Wed, 15 Nov 2023 16:01:51 -0500 Received: from mail-ot1-f46.google.com (mail-ot1-f46.google.com [209.85.210.46]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2AB32BD; Wed, 15 Nov 2023 13:01:20 -0800 (PST) Received: by mail-ot1-f46.google.com with SMTP id 46e09a7af769-6d30d9f4549so53100a34.0; Wed, 15 Nov 2023 13:01:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700082079; x=1700686879; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=RCg6f5/T02V1q5il/uuEVJCsez595XWmMuk/ZZxOjtI=; b=XioGdLP+Dsiied9KwmIlx12WIlEqlY1YTtqBZratTC8/tOClbBbsXHJvJ78SYWiuL1 RqkbBWN74zcSxkaC6v8wZo5n0AeN+UYGoGntf63IJOgGpBqwitPge51uZ90IFiB2Y9mO T2FnMmZH/BAmx/fxlTvM84ETXuMRZVbDn9BmYwKk3fdI0vSPtiLs5cSLva8OAUrfIJk+ evQzllrsb+PKg0DHce2QdvqzCx9rfRxvyYXxzegEfbmG3TffoSIefVybZT2+b13auPIX J7zrlYMd1dnxr5vwLzYw/wr4omq9rMtPanSOcOBhmUKhnKy+BO3rfLDUl5W60NGlm2Ub NahA== X-Gm-Message-State: AOJu0Yw/jNdZsAk5NPmXK1kTttGOBMRJPvdpcM1OUkb+RQb8x/afhdrW DsZGmENcwQFkuLSfSvSy+A== X-Received: by 2002:a05:6830:614:b0:6d2:e1fd:9f5e with SMTP id w20-20020a056830061400b006d2e1fd9f5emr7098733oti.6.1700082079446; Wed, 15 Nov 2023 13:01:19 -0800 (PST) Received: from herring.priv (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id s30-20020a056830439e00b006ce2e464a45sm692655otv.29.2023.11.15.13.01.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 13:01:18 -0800 (PST) Received: (nullmailer pid 3738432 invoked by uid 1000); Wed, 15 Nov 2023 21:01:17 -0000 From: Rob Herring To: Sean Young , Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RESEND PATCH] media: ir-hix5hd2: Use device_get_match_data() Date: Wed, 15 Nov 2023 15:01:13 -0600 Message-ID: <20231115210113.3738233-1-robh@kernel.org> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.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 (agentk.vger.email [0.0.0.0]); Wed, 15 Nov 2023 13:02:40 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782665357581736525 X-GMAIL-MSGID: 1782665357581736525 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/media/rc/ir-hix5hd2.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/media/rc/ir-hix5hd2.c b/drivers/media/rc/ir-hix5hd2.c index 0034f615b466..de5bb9a08ea4 100644 --- a/drivers/media/rc/ir-hix5hd2.c +++ b/drivers/media/rc/ir-hix5hd2.c @@ -9,7 +9,9 @@ #include #include #include -#include +#include +#include +#include #include #include @@ -251,7 +253,6 @@ static int hix5hd2_ir_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct hix5hd2_ir_priv *priv; struct device_node *node = pdev->dev.of_node; - const struct of_device_id *of_id; const char *map_name; int ret; @@ -259,12 +260,11 @@ static int hix5hd2_ir_probe(struct platform_device *pdev) if (!priv) return -ENOMEM; - of_id = of_match_device(hix5hd2_ir_table, dev); - if (!of_id) { + priv->socdata = device_get_match_data(dev); + if (!priv->socdata) { dev_err(dev, "Unable to initialize IR data\n"); return -ENODEV; } - priv->socdata = of_id->data; priv->regmap = syscon_regmap_lookup_by_phandle(node, "hisilicon,power-syscon");