From patchwork Fri Oct 6 22:44:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 149447 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a888:0:b0:403:3b70:6f57 with SMTP id x8csp635333vqo; Fri, 6 Oct 2023 15:46:16 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHDX6pZ/9loqsM1udV/VbjLcVih8TxphCI9jKyUqBKsYzp7mejm5ncMllLNs+5s5N52SPx4 X-Received: by 2002:a17:903:1252:b0:1c6:d70:144d with SMTP id u18-20020a170903125200b001c60d70144dmr11242468plh.34.1696632375778; Fri, 06 Oct 2023 15:46:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696632375; cv=none; d=google.com; s=arc-20160816; b=tJjfE610KjCdaWah+ug5OlYncehD3hpJr8wpk87lj6RdOkKll76NmEqvoBYKOGmX01 Z7JC6IutWPMNme213menhl6R1dETkESUIQYUHJmE57iikSXdJmx+i6ON2jgwE9/S5MwM boa6BhHu5QVREwQWHPbdrDP1Tn1RzATrwNMFI7G13L3FJ2mpsgNKXo/2KddLBVHFsLqR yQnieFbk9wr28pgR5VEfWowsz+KTT79Zr6aRAF8j475FAejcKY7HB+Y0kLWYjVKWWznm 3oNFCXUEioWOKOYMvdxYPvv5u4nQhnL/MrLOblgFQMGY1Tdj+9pa+fahxg/hX0M89oo9 k0bQ== 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=g7l+7PwRK/KIrSNwNOeQSmcyUzx7VCGbc0PgfbxMM4g=; fh=jtspXXpwe0EtI3g3aFPJY1ANhfzWLXuAr1n7JzlnjFk=; b=GpLwiKHLQAstcSoRs9NbJj39u2n8/v0AV8hwqfpTnv58NuvsJsJ0RHFUp1P56tHDow OBac1c33SKXxk9eM1LQPvsaUk1gliHnppsROgpN8rq9kaSkgA+Pb+tEd9iwuFPsAlEJp Cbwy3p77uC+V2Q6ohHuonKqoa60CiDV0YGLwJyXiU01HwFpedUHEhp+/kGqT8vMTR/mR lm+6Of7nvCP5+Va6w5RY/PuJQKNdc/FEIxWXqHSvFhUFnMp3bVs2BKw7pm84/05G2asj EnhdfV7SAHxy9ZdMvP+KK/TCiVUMDeQ6n0beHCIvFGFX5Q2EXTdU+v9cAJv9SO8S3ug9 P1eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sfdwVhXL; 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 jy7-20020a17090342c700b001b801bd7fbasi2881661plb.417.2023.10.06.15.46.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 15:46:15 -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=sfdwVhXL; 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 AA04F8056C7E; Fri, 6 Oct 2023 15:45:15 -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 S233522AbjJFWoo (ORCPT + 18 others); Fri, 6 Oct 2023 18:44:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233802AbjJFWon (ORCPT ); Fri, 6 Oct 2023 18:44:43 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54B2F93; Fri, 6 Oct 2023 15:44:40 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 90726C433C7; Fri, 6 Oct 2023 22:44:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696632279; bh=YoE+IETji8jPLWdxvOTSBPuvIy3CWy3/W00cFbvaZVA=; h=From:To:Cc:Subject:Date:From; b=sfdwVhXLnB5x0G2GMOhFQwyi7aN8LrsurzCp6eDI5oRAo6KLVOBCnf0ffzW8ch4s7 bT6XjnaWuoUAMtF57vrHlOOlnAYKSj49vR79/mRVfVLTNBg25KIRdFZhQNX2UTGJ+l YUI45j/EvJbJ3R6bxXYg4oKVS3e7I2W+nLgoswk8ovhmY4eFtqKU/4khwbdS96LsZN CaeH3D0FrfS9hqb4lg0jBwdUsir6f6SMDeJevG2TH8JrxndS0JTQ8h06Eoe4zefKSK 4X3XyaF4XMeyV4/9s9f7lfYYHWuVGEzqPxSK3z0oxLtzwLKJILE65qKnsMg4LYFyFP vAoRGjMAneU6g== Received: (nullmailer pid 442832 invoked by uid 1000); Fri, 06 Oct 2023 22:44:37 -0000 From: Rob Herring To: Laxman Dewangan , Dmitry Torokhov , Thierry Reding , Jonathan Hunter Cc: linux-input@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] Input: tegra: Use device_get_match_data() Date: Fri, 6 Oct 2023 17:44:32 -0500 Message-Id: <20231006224432.442709-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:45:15 -0700 (PDT) X-Spam-Level: ** X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779047990026818618 X-GMAIL-MSGID: 1779047990026818618 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 Acked-by: Thierry Reding --- drivers/input/keyboard/tegra-kbc.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/input/keyboard/tegra-kbc.c b/drivers/input/keyboard/tegra-kbc.c index c9a823ea45d0..a1765ed8c825 100644 --- a/drivers/input/keyboard/tegra-kbc.c +++ b/drivers/input/keyboard/tegra-kbc.c @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include #include @@ -602,9 +602,6 @@ static int tegra_kbc_probe(struct platform_device *pdev) unsigned int debounce_cnt; unsigned int scan_time_rows; unsigned int keymap_rows; - const struct of_device_id *match; - - match = of_match_device(tegra_kbc_of_match, &pdev->dev); kbc = devm_kzalloc(&pdev->dev, sizeof(*kbc), GFP_KERNEL); if (!kbc) { @@ -613,7 +610,7 @@ static int tegra_kbc_probe(struct platform_device *pdev) } kbc->dev = &pdev->dev; - kbc->hw_support = match->data; + kbc->hw_support = device_get_match_data(&pdev->dev); kbc->max_keys = kbc->hw_support->max_rows * kbc->hw_support->max_columns; kbc->num_rows_and_columns = kbc->hw_support->max_rows +