From nobody Thu Apr 9 20:24:37 2026 Received: from CH4PR04CU002.outbound.protection.outlook.com (mail-northcentralusazon11013020.outbound.protection.outlook.com [40.107.201.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 765B42D9ECD; Thu, 5 Mar 2026 19:35:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.201.20 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772739352; cv=fail; b=NhImBtSzvSMNXG0NS2xxleoahWjlEYj2rWu8fXG3e4YeTLFXBTS4qgj/8y8Y2dcWzVStzpkb8D95At/NO+35h97dj+40jRRDfvkRkTtb2X4xAyemQ4cLM3YBO8LL4JUbuiU0Dq6/PBZ9GD02dy+dovygIa9CpWiaoUsqAAo3ssk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772739352; c=relaxed/simple; bh=IRCDz+BIbXIxo654FbuXhzus6ildmqDCNVHHoJFkhJY=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=FTMzbzxVXQXs/NJLo0JDQI0ihyNyw3kNqqAknvRCjpi2Cux7e3jHkSdj49GwtfhGL+nHN6+d6N01X7AzIPDxzY/KK0XnnteuZw/UeFKoV4g++nubYUaYpcufrHhcWc37ieeXsMRLCTjORWIw+iq6Ku3C1rPxqGqc4vtNc9LN5u8= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=cmzYvP71; arc=fail smtp.client-ip=40.107.201.20 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="cmzYvP71" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=IHW2KLZs3nKXouUh6UvUhiYg7CKtX8Gv+bd+pVrMqvBdze06rpY+2uq19d7Svti4vGMsW7XDEe80Rw7DKz8HzUGdBw4q8t/Y/q1zpb0xTCS4jmWCEEKeD6gfIBzC2HgTZXw1pgYivEoHqYB0AV12XsTGrD1w9cpxAnWxmFLAFKzG09N/v2D7JdbExJ/pT2Abdty9PKuS60I+3peuTnkNpdN7Fl1km1I6Alhk9xj1Wo38PuPaMM7rGkqgoIvdgPsZMPgw8CsblyWHFedWqLDCQ/VaaD+IMhDeCnrCB4sdqvqzJmUJQ5hdFwMrFSkmqYrtZgQKLHpdzu0njcnzOiyh/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=JMIsRWBCAcp71+nhzQnKz6CzKi/vadinRct4ioI2LqE=; b=MtYwSA53UpWL+qAsYPR+yMt68n05i8B5/dRhSLTYS42+h1LQNAJ/8MPLLOku2lVZO+LvQAsZ5G9YgobjpLB3OjdB6wGf/123qX94EdFdJ/UcvG8LTnvL8/5J0PCa9OoChMvvFcebqOKX5ezDJesK9bVzdgYxZLXKpUpsmWm4Gsq4/fBoB4F5rigV+yTCLRc2H4FkBlX5aPKaSTz6zq358jhothrdJytSlz9ZD2Wil33+OFEbVT6mPv2sKu8ITFJ1h0XmTPfB3Nw5uIgj7L1Wr4CGlCwkhD0lupp2ecUd32kxBMHdfi4O4Aa6pkVBHZrZnzReLFXT8Zd9oEjJcFR6EA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 198.47.23.194) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=ti.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=ti.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JMIsRWBCAcp71+nhzQnKz6CzKi/vadinRct4ioI2LqE=; b=cmzYvP71Xecft+VHtc1apbrHjfEtaqCWYq4mAFWzh4/zYqJaM49RVvdy1gXlEddL54BssOm3vUVtGUi8sz322t4iYjNEqeyuGDlg3AAe3iK0g+STYfriCH7rONh6k9msUckDRyMj4jLBzhTcdh/OGde84ucZd4vsN0UkB53axvw= Received: from BN9PR03CA0765.namprd03.prod.outlook.com (2603:10b6:408:13a::20) by LV3PR10MB8177.namprd10.prod.outlook.com (2603:10b6:408:289::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9654.22; Thu, 5 Mar 2026 19:35:48 +0000 Received: from BL02EPF00021F68.namprd02.prod.outlook.com (2603:10b6:408:13a:cafe::ee) by BN9PR03CA0765.outlook.office365.com (2603:10b6:408:13a::20) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9654.23 via Frontend Transport; Thu, 5 Mar 2026 19:35:48 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 198.47.23.194) smtp.mailfrom=ti.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=ti.com; Received-SPF: Pass (protection.outlook.com: domain of ti.com designates 198.47.23.194 as permitted sender) receiver=protection.outlook.com; client-ip=198.47.23.194; helo=lewvzet200.ext.ti.com; pr=C Received: from lewvzet200.ext.ti.com (198.47.23.194) by BL02EPF00021F68.mail.protection.outlook.com (10.167.249.4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9678.18 via Frontend Transport; Thu, 5 Mar 2026 19:35:48 +0000 Received: from DLEE212.ent.ti.com (157.170.170.114) by lewvzet200.ext.ti.com (10.4.14.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 5 Mar 2026 13:35:48 -0600 Received: from DLEE207.ent.ti.com (157.170.170.95) by DLEE212.ent.ti.com (157.170.170.114) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 5 Mar 2026 13:35:47 -0600 Received: from lelvem-mr06.itg.ti.com (10.180.75.8) by DLEE207.ent.ti.com (157.170.170.95) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20 via Frontend Transport; Thu, 5 Mar 2026 13:35:47 -0600 Received: from fllvem-mr08.itg.ti.com ([10.249.42.149]) by lelvem-mr06.itg.ti.com (8.18.1/8.18.1) with ESMTP id 625JZlde2431963; Thu, 5 Mar 2026 13:35:47 -0600 From: Andrew Davis To: Alexandre Belloni CC: , , Andrew Davis Subject: [PATCH v2 1/6] rtc: abx80x: Remove use of i2c_match_id() Date: Thu, 5 Mar 2026 13:35:40 -0600 Message-ID: <20260305193545.796294-2-afd@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20260305193545.796294-1-afd@ti.com> References: <20260305193545.796294-1-afd@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF00021F68:EE_|LV3PR10MB8177:EE_ X-MS-Office365-Filtering-Correlation-Id: 8c7db392-910e-4ff1-6b88-08de7aee673e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700016|82310400026|376014|1800799024|34020700016; X-Microsoft-Antispam-Message-Info: 5OBPHg/F0tpLIgzF0bOcjHRLy+/djakQyNkQiIxcCK8iZb5UFEuXGwFbEgGESsjvJfRjeLGYnqBwGd+vg6Qwb0jC9jAQBO99rCa/3npww56wYFQxQJI16vzO3jQtb2aA1zAVYPGW2M3O9klmtFs4jMPCigUummGY9EZH/F3FPB4oUe66t4Q+mHBOYUBf/saGd50+zL2XIvYjVA6rfJrTuqOMtRgTcjCFB6GmdMAX2xXPAnZGX9nVFAiZVdlTi5x4RMNmfgypjnqZOph8/dc1v58ARLXZ89t9Op7HNbfSnS4yBfE6qEwbDMSK7COGmOYc0nu4xROPhGmV1rrdppwNlw0P3VoTN6UGmwrhzzGPe9ZdOL0UdBGy9FZDIdglD/yGf1SRCm/g7Z+mOuPxjtNBSUYMe8mIOkgzs61spDqxz7vSlJkIezpfJeqW6aVCU9S68LyU4Ma3ngSzR8WXIHhcDuMYTOXD4ePvhSxogaLZAOagY+AejfxIKORhf3sgb6kxJ1jpd1qfPi+xjCypJ14O70sDj4E+awhDXW9olezZ+0Jv4Ct/RfggQmnug8zcjTX71O6IzVBF5MNelkyc82o0nOQbWa80oTGHFR08yxYdefSn0fOirzFmY/+uSzU8WFj465ZWy4vEN/WVBnFoPckNfXflyjI2cAJxRWu3aAyaZ5C3UpyiRziN0DK9Q0QhwGGkGqYFWxqQ7TC3hajQgG/TQ+yc1k1lo+xVbP7GwhnJXYrdtTYmbFYec7BPVZbOMyXXjwbQ0ZNhEQG9zgXfmKNhOQ== X-Forefront-Antispam-Report: CIP:198.47.23.194;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:lewvzet200.ext.ti.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(36860700016)(82310400026)(376014)(1800799024)(34020700016);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Wb7ol58DAgJWvq2dcjf2j1FH+2R2EkFyKzm9FNk3M6ZcWuPBbcX9kLjJy3OqPFLNNLD1/0AHElco9f2u5zhyytUJSlrtJ3zLPxwEwyNIvJ+ZU+sWUrHaVTu/J9+nL7wqG9sQCpqd7MrigHRunwiePxoMNCTuARPrhLPlNgTEZNqNIjaY+dy/aoaY/1Oe68FPcVnIQcvK4b8XjSW78W4eszuMMrT/0ZgtSgqq5Of3pLPgboIjIFJEJ04oZ/W5G5I5Nka8+Fr/6P2wN/nI52o68VoxsBtgolOcCmThyK7THvd2a9zoA25HTD8hPuobsBeJI9kuOwKVODyzcv32Z6Yu0wA3a14ijFhM2Zla1ygsqL3+BJUIV9hU26LHRGAOrZpiRgW2FquUwFat8QGrn7NYK9InNdFndNegFSJ8qRbo/cS3OsvI8bkJOTZJK5qhAB9g X-OriginatorOrg: ti.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2026 19:35:48.4889 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8c7db392-910e-4ff1-6b88-08de7aee673e X-MS-Exchange-CrossTenant-Id: e5b49634-450b-4709-8abb-1e2b19b982b7 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e5b49634-450b-4709-8abb-1e2b19b982b7;Ip=[198.47.23.194];Helo=[lewvzet200.ext.ti.com] X-MS-Exchange-CrossTenant-AuthSource: BL02EPF00021F68.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV3PR10MB8177 Content-Type: text/plain; charset="utf-8" The function i2c_match_id() is used to fetch the matching ID from the i2c_device_id table. This is often used to then retrieve the matching driver_data. This can be done in one step with the helper i2c_get_match_data(). This helper has a couple other benefits: * It doesn't need the i2c_device_id passed in so we do not need to have that forward declared, allowing us to remove those or move the i2c_device_id table down to its more natural spot with the other module info. * It also checks for device match data, which allows for OF and ACPI based probing. That means we do not have to manually check those first and can remove those checks. Signed-off-by: Andrew Davis --- drivers/rtc/rtc-abx80x.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/rtc/rtc-abx80x.c b/drivers/rtc/rtc-abx80x.c index 3fee27914ba80..eca09872ea971 100644 --- a/drivers/rtc/rtc-abx80x.c +++ b/drivers/rtc/rtc-abx80x.c @@ -772,8 +772,7 @@ static int abx80x_probe(struct i2c_client *client) struct abx80x_priv *priv; int i, data, err, trickle_cfg =3D -EINVAL; char buf[7]; - const struct i2c_device_id *id =3D i2c_match_id(abx80x_id, client); - unsigned int part =3D id->driver_data; + unsigned int part =3D (uintptr_t)i2c_get_match_data(client); unsigned int partnumber; unsigned int majrev, minrev; unsigned int lot; --=20 2.39.2 From nobody Thu Apr 9 20:24:37 2026 Received: from PH7PR06CU001.outbound.protection.outlook.com (mail-westus3azon11010019.outbound.protection.outlook.com [52.101.201.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C90D4200110; Thu, 5 Mar 2026 19:35:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.201.19 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772739353; cv=fail; b=FG34JMsPlRtxr+1RMZUqPLbFUWdLiQ7L3C6/+OaJexC3d6SEOOG+0IkvzmPGn3r/HwEldTxkhnS29+9lxoLyddUGEhiI4oiQBA3zlDdszmigipnnSantl6IxnU/+e7pxowGXsoKg+y4YkVkDkTQHCaDxwW9jKV55RV5LiTtm+68= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772739353; c=relaxed/simple; bh=/aICm3XzYBjCfzdo5sT3jJKBlpUkoCXXo267zuhYiDc=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=eY9NewO7ExtMA3GHVgLJtTK4lEQTL3/fR36I2I8W/NF0VuXoCxDntbNGPa6Ig4DND0ZXekFJmATBwUGSNV8vqS5vdmxzkVaS2nlHNZCZLD9G5BedC3ZxTfL3dJ1Vmgc5S6Kpn3pZ6J1VopkwK8YMVU5KxTXXCWo2OLtSbkSduJA= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=mhcm+iCZ; arc=fail smtp.client-ip=52.101.201.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="mhcm+iCZ" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=G/5XxGZTZnDsXvfwWmM5ndys0US2Ki8Z/CPz4httAdq5A32Q7MMQAorGrEnjMW01NPdALs+Gdt2jhq460bDmyNuV6JPb4Zg3J8i7FpoXId3U9aH1mc98NnDtBwNilBzwxy1D5H50kCtnEyNw5Kax8B1sbVErQltC2/bUn3owZZ3ZsNO17H7fOW3TQmkE/bauvpuYxE/QjQvYiPt+mUjYT0NTFh/daM0329vTw1aYiMiHyIaghLYd9loqbOx9E8rcaxfTqBXE6NguCR32Jhn1Bz9q/AD1P0jNpu5jk8Lu1d5N6HnYweExLjU7lUNm07ny8v2cX22v1M7yX6vjXsNDrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=/n8RfiF8I5dRieB20BqZfXKHiWHvHVsQdG9yliPrCDE=; b=wIoqja7tyw2cKrHay7bEAT+YFOND47vKQRRpH5FooGnfFLchjojKonrvcMkE56vNITHM5n7Pl5QKzc4dF0+BFGZSZsJxjGkSqwvZ84aWEfdorYYPUO4zgSltR/6OcdkePgaRP3wqTEcWMLn5HyNAFyKUkr2OcpMNAVkWORMqG0x5+p03cK7E0qogKIlKpCSqHV4ACIkjivG+9K4HnYvOrV0pSXC5tLCFQMEazFqDXUsyXKfSTGbCguovf5cSW+xcvsaz4gjOUEBjeqcbQrrzua53SWrIAkrv9tw8YYHA4xmdTfCoeIWUrShgHJOx5oM0mbxYiN1uBSl5hlekCVKTyA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 198.47.23.195) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=ti.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=ti.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/n8RfiF8I5dRieB20BqZfXKHiWHvHVsQdG9yliPrCDE=; b=mhcm+iCZc8Pac8e0gL+CbOVTFCOeL0RWBv4j/di7jdr3Ic+Hf05qypKIl1G0OULr/yLRgY8SUismjCg1j829yrsUkiNYzyDM/m5U+By/87RsPS+a8692lDMyysDmilEmv9lmf7ZeXBPMwbYppvkKJUpOwEAC6cTRr6BIGYApL2E= Received: from BY3PR04CA0013.namprd04.prod.outlook.com (2603:10b6:a03:217::18) by CO1PR10MB4403.namprd10.prod.outlook.com (2603:10b6:303:9a::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9654.22; Thu, 5 Mar 2026 19:35:49 +0000 Received: from MWH0EPF000A672F.namprd04.prod.outlook.com (2603:10b6:a03:217:cafe::86) by BY3PR04CA0013.outlook.office365.com (2603:10b6:a03:217::18) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9654.22 via Frontend Transport; Thu, 5 Mar 2026 19:35:49 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 198.47.23.195) smtp.mailfrom=ti.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=ti.com; Received-SPF: Pass (protection.outlook.com: domain of ti.com designates 198.47.23.195 as permitted sender) receiver=protection.outlook.com; client-ip=198.47.23.195; helo=lewvzet201.ext.ti.com; pr=C Received: from lewvzet201.ext.ti.com (198.47.23.195) by MWH0EPF000A672F.mail.protection.outlook.com (10.167.249.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9678.18 via Frontend Transport; Thu, 5 Mar 2026 19:35:48 +0000 Received: from DLEE215.ent.ti.com (157.170.170.118) by lewvzet201.ext.ti.com (10.4.14.104) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 5 Mar 2026 13:35:48 -0600 Received: from DLEE215.ent.ti.com (157.170.170.118) by DLEE215.ent.ti.com (157.170.170.118) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 5 Mar 2026 13:35:48 -0600 Received: from lelvem-mr06.itg.ti.com (10.180.75.8) by DLEE215.ent.ti.com (157.170.170.118) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20 via Frontend Transport; Thu, 5 Mar 2026 13:35:48 -0600 Received: from fllvem-mr08.itg.ti.com ([10.249.42.149]) by lelvem-mr06.itg.ti.com (8.18.1/8.18.1) with ESMTP id 625JZldf2431963; Thu, 5 Mar 2026 13:35:47 -0600 From: Andrew Davis To: Alexandre Belloni CC: , , Andrew Davis Subject: [PATCH v2 2/6] rtc: m41t80: Remove use of i2c_match_id() Date: Thu, 5 Mar 2026 13:35:41 -0600 Message-ID: <20260305193545.796294-3-afd@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20260305193545.796294-1-afd@ti.com> References: <20260305193545.796294-1-afd@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000A672F:EE_|CO1PR10MB4403:EE_ X-MS-Office365-Filtering-Correlation-Id: d7a59c39-9693-4ad0-532d-08de7aee676b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|34020700016|36860700016|376014|82310400026; X-Microsoft-Antispam-Message-Info: j/PNHW1Q7y9L/4ryQf/1C760O4Y+qcVj6fOglXGf2SH5ACocZ//8Mbpj1tD1cg7zVdOqGS16R2e08nZyrkWXPwQ9nBqLJw0JxOMhblPSnzE1KPc0zjLQub+2tCNhIGsYHjjZLCrHFVnFRNfO0kEpW8ivSzsn0iidz8i6922qK3/lA8+RcvNfbZWZ3RXD/r1b9iiXiO+VlO8mvk5oTMhYA5e5EFdCrxw//9976V8dn6DTqBgTubLuyFVMAhqzvkB2UGTMBS7W2EvX0SNK16u5/jPWTc+L0fqpRpZENj/w+P3ETgTiTZA7mPIwYDrznCgKRN06x+RRWvTxMezh9UVzGknkGD+3tAc53f2nOvpALLvW6WILQFT6hej68uquk+xzKi9GWWSDvqwOn7aE/wIAQE9ooQpboGcAt9B5sywDffHEBnMbaFJWd6LJtc69GfVtK3N9W9Db+YM7vBwIx6BvcbCqssl80gtcszjGJgRJYb7od0e98vgW0AlpmTpdauu5NVOorbcIhvSH/nLb1GbzzMf6c7a1Z7BTKfWYuEwikC6GyJYDit3FbAfL47fIjfOUawr4EDykWGaxK8DkTWo0uyaLDAFc8fWsu/1LGpKkPPqS8UnjYjUg66JdPlaLhk5wGmRi6gNyw6SUYQLxdHl+I2Hc4oTnPyVccn5nHX7Tkw8OKAenOpFrrXWWsK5+6DMBt+EAoPMq4m1UrkfAi80FTotSXSQTRKJYzJdf74ULuKMyTVgNJgBKXoQ/w0ODEITl18HS2NlFoFACmFZEdlypMw== X-Forefront-Antispam-Report: CIP:198.47.23.195;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:lewvzet201.ext.ti.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(1800799024)(34020700016)(36860700016)(376014)(82310400026);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 0RswbK1z+Z6/kk6Crg1WSh+dxxWm13qccIaUiZfza6ML61WvFualHDdm8VmMSrhyI222r/yaxBdailG6z//DzZMoNoh1P7MBz2weEI+M23ltQvGNqhffHb3Ri2VljhrIqslJISwnUCTflZQduAFx3sK7fUYe9qoPNSdqon5Ku0fEj3wBD3EXCw41C0Rc3prCAOd0n8mlLH0lI767El/SzPG7CE4W+hC8/jAwFCAqNwojoxwQGt1j8QJO8zREQvH4jiBfWEWrY8aFth/aFJAq0EjiR7AIm6xrlIkXC2OcIplG7byEMdH2P1vXAJ5RDAaTcJp7nWdpz6wUdH9La3Rn4mRbS/KiPvHZ66cvjycFV+gzL+0Bij2M3wYoe7fan1LNrrByav6NlDjZVxY4g3qcMn0NbqIx/ExExJo5TjcJPQh8/TYGnzTY5ygWwd8pJMYU X-OriginatorOrg: ti.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2026 19:35:48.7699 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d7a59c39-9693-4ad0-532d-08de7aee676b X-MS-Exchange-CrossTenant-Id: e5b49634-450b-4709-8abb-1e2b19b982b7 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e5b49634-450b-4709-8abb-1e2b19b982b7;Ip=[198.47.23.195];Helo=[lewvzet201.ext.ti.com] X-MS-Exchange-CrossTenant-AuthSource: MWH0EPF000A672F.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR10MB4403 Content-Type: text/plain; charset="utf-8" The function i2c_match_id() is used to fetch the matching ID from the i2c_device_id table. This is often used to then retrieve the matching driver_data. This can be done in one step with the helper i2c_get_match_data(). This helper has a couple other benefits: * It doesn't need the i2c_device_id passed in so we do not need to have that forward declared, allowing us to remove those or move the i2c_device_id table down to its more natural spot with the other module info. * It also checks for device match data, which allows for OF and ACPI based probing. That means we do not have to manually check those first and can remove those checks. Signed-off-by: Andrew Davis --- drivers/rtc/rtc-m41t80.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/rtc/rtc-m41t80.c b/drivers/rtc/rtc-m41t80.c index 740cab013f590..b26afef37d9cf 100644 --- a/drivers/rtc/rtc-m41t80.c +++ b/drivers/rtc/rtc-m41t80.c @@ -924,13 +924,7 @@ static int m41t80_probe(struct i2c_client *client) return -ENOMEM; =20 m41t80_data->client =3D client; - if (client->dev.of_node) { - m41t80_data->features =3D (unsigned long) - of_device_get_match_data(&client->dev); - } else { - const struct i2c_device_id *id =3D i2c_match_id(m41t80_id, client); - m41t80_data->features =3D id->driver_data; - } + m41t80_data->features =3D (unsigned long)i2c_get_match_data(client); i2c_set_clientdata(client, m41t80_data); =20 m41t80_data->rtc =3D devm_rtc_allocate_device(&client->dev); --=20 2.39.2 From nobody Thu Apr 9 20:24:37 2026 Received: from PH0PR06CU001.outbound.protection.outlook.com (mail-westus3azon11011047.outbound.protection.outlook.com [40.107.208.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 391732C15A2; Thu, 5 Mar 2026 19:35:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.208.47 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772739356; cv=fail; b=dnEBeP9m5AQVxTigTBlNZIqMG/jxl7NJ6qaaoQ5ic69yJQSKVdS4AabXW4b5A2Y9WpTxBrnlrTuGPy+BLH4KqUQxeS9zNSJRDSsBezyAT0IPjf9u/n26AAMcB1z3B9vy59y5nrT4cn+jWl0z7GiBLCg1hMFfzRMMd5iFqp9ROzU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772739356; c=relaxed/simple; bh=r7A+wy8elrSwPf5kKH9H9sjGmBLGVLlalb33W3hMB+Q=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=MCjxKJs/TnZ/WByj2QrVLo20ZXAScP8+ezW3B9SUdA7rK7puRHz8ZdSABsIzKq70gyrc5k5sxIUS9OrKb/GEY1BC5Vv/chs5BJVQksP/7Jz0RaA12cfMcFXlPQVP/+TPpQgzu4J4jZOgSsCmgt/svsnWPguRRajVLjqVdBPqoBw= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=uaO/dDPH; arc=fail smtp.client-ip=40.107.208.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="uaO/dDPH" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=sS8PnVSUn2Uh2j35ZKiDEddR606gBdVOZ6XKTsNh2e4VMATCshSSlB2LlicqUORuD+7Igcx6VPq4wnzHyv5Tos6e5s6aFqeS+ig5KrsRJ5gsB6aQY5sTV01QqX4FDA8YagtKHjYFXMP79mZr0Vjuen8fAON9Z3haf5bVIXMJyceMak+b71XSsdBTK9gU8RakpQqse1F39FJM07ho2HIVeiprkm0TlpnfevN0aZ3w6+AVFfN9KUtk9UyK34ReYcILEnj1p5Mud61bcWZ7YbAvableee0NUb+Sq5FHT/MBXurApiJAzEE5N1thVJC+EVrM2GZP7pIWwZI+jdKHYdON3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=9CLtogKd840tLQph3zYS/G4glg3N8Ova/p+0NWoGs+k=; b=aHgRHCBUpsed+EA9qD1Z6BzhP83e8IQYh0hw8DljjKk6OGda6qNdd6TGxCWBVth0+RLndU4QzEcJyuT7dBfHvkl7PfcVGhgX3u89txBTEIJCGdruMAwyzQMx8gkbfKcL9KpsoRGZyjVc71u12+R02VMHE8VNOks3GqMpUNWPnE//G4rDDdX4nZho+4ziEo3CKvDKj8MyCJSl3zLJIw5lMM5gMCIsAG545X1yXYwKFCkrooqL8NKBGFuPMrf8KafafMqri3XIXh0hx9xb4gNOUmoepCepVBWu5LpCqmOSEnKG7BLFaIzSF+p6EzQFM4/R3JcxMh6WhGdq7IyIjOs9PQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 198.47.21.194) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=ti.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=ti.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9CLtogKd840tLQph3zYS/G4glg3N8Ova/p+0NWoGs+k=; b=uaO/dDPHZhy6tsQDsHiptsBXMCWmsypaJPiGDYKv+Sf2ZwvAvuToRuUladLNkasiDB5M3svEuGj0VGNPJbg6/bJB3i+WDXoKerFeFar7FSz5h0H/1Aij5K+nHns9ERy3zINADLiukYJUOZlwQBP1j5ckYPp3kodyLMlSGoQkIew= Received: from BN0PR04CA0111.namprd04.prod.outlook.com (2603:10b6:408:ec::26) by SJ2PR10MB7112.namprd10.prod.outlook.com (2603:10b6:a03:4c6::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9678.18; Thu, 5 Mar 2026 19:35:52 +0000 Received: from BN1PEPF00005FFC.namprd05.prod.outlook.com (2603:10b6:408:ec:cafe::be) by BN0PR04CA0111.outlook.office365.com (2603:10b6:408:ec::26) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9654.23 via Frontend Transport; Thu, 5 Mar 2026 19:35:33 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 198.47.21.194) smtp.mailfrom=ti.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=ti.com; Received-SPF: Pass (protection.outlook.com: domain of ti.com designates 198.47.21.194 as permitted sender) receiver=protection.outlook.com; client-ip=198.47.21.194; helo=flwvzet200.ext.ti.com; pr=C Received: from flwvzet200.ext.ti.com (198.47.21.194) by BN1PEPF00005FFC.mail.protection.outlook.com (10.167.243.228) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9678.18 via Frontend Transport; Thu, 5 Mar 2026 19:35:50 +0000 Received: from DFLE213.ent.ti.com (10.64.6.71) by flwvzet200.ext.ti.com (10.248.192.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 5 Mar 2026 13:35:48 -0600 Received: from DFLE209.ent.ti.com (10.64.6.67) by DFLE213.ent.ti.com (10.64.6.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 5 Mar 2026 13:35:48 -0600 Received: from lelvem-mr06.itg.ti.com (10.180.75.8) by DFLE209.ent.ti.com (10.64.6.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20 via Frontend Transport; Thu, 5 Mar 2026 13:35:48 -0600 Received: from fllvem-mr08.itg.ti.com ([10.249.42.149]) by lelvem-mr06.itg.ti.com (8.18.1/8.18.1) with ESMTP id 625JZldg2431963; Thu, 5 Mar 2026 13:35:48 -0600 From: Andrew Davis To: Alexandre Belloni CC: , , Andrew Davis Subject: [PATCH v2 3/6] rtc: pcf2127: Remove use of i2c_match_id() Date: Thu, 5 Mar 2026 13:35:42 -0600 Message-ID: <20260305193545.796294-4-afd@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20260305193545.796294-1-afd@ti.com> References: <20260305193545.796294-1-afd@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN1PEPF00005FFC:EE_|SJ2PR10MB7112:EE_ X-MS-Office365-Filtering-Correlation-Id: f1e2fb12-9924-422a-6769-08de7aee687f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|376014|1800799024|34020700016|36860700016; X-Microsoft-Antispam-Message-Info: 3PnP6O82ySwmcR1jX3lBNsD/7cD2QstWaZoILSReptnH6Iawr4yOXXiuOHSn4WrcEx0qKiSrRGnOh2eOLfSgMQXVhlbgNNG+SxGPR4dU6c79dS+JmZt9j2gybq8jBgDE0t/hbAmuaMcjr6ZyZ25th45dUc4XXv3WyGwfpbEE+I+dUlwS/S+Z4RK1+1xI3fy1CkJ5mEKG19fWHmZ25JhSq0bAeivn/i6u0iapFSTiXDX1Qo/duzCHnbdQCOxDmZspL3M8SyAtwhD6GxHHYWvlvbvaYRD6pQ6NcEQB6pzigEJ8QiRHmgviv6YmhzGqJ7heExvbcHo2iLBAAP3hwFQ28Z8ZIf+yis8QKxGdTdbXYQpwyro1DVrqHRv+2+4mKfhX5XIkTSENbRjS61t+pcwT3rQdVmH1gGuZtN/khZbgS3kIAO+uyCtw1Rm5WC4BeESm7XAIYV2h4WZb32ijRA1i9uXhZQVCF0ptd3MLDzezef7oeG34XJRgMZmY6F7D3ASmnfbodj/qTLVOaudVwKSzymGiNkvN0xswL+uyMkmypMOLXs3dXH2p62TbUDG+7+csLrA+prdF2NBMwMb7ke8g/Ub9hbQLEZY/OjlOAW+3otw8bAkjXfzDu7Kt9lCPVW0hot7zVzrezWs5T2rkKqO6OO8Oy/T2UI3rxttXOyfNps0W/f1rv1TJHC4oDxm4sdH3KsErviMVpVZOKju/1bcEKzu1+G3cWHgYuItGmJIlJiYTic+HIw3pGR96uVlnbbROCo6fJNRfq0dz5vpTLC/t9g== X-Forefront-Antispam-Report: CIP:198.47.21.194;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:flwvzet200.ext.ti.com;PTR:ErrorRetry;CAT:NONE;SFS:(13230040)(82310400026)(376014)(1800799024)(34020700016)(36860700016);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: c6lfMOLOILy/56h3pQCaFYfjdpugb9DGuuXULQ3QjOONW1rhENehljctB3+BxmJ2SHiguCMlG2w/AOc8LOtmNwT73pW76ZfynJRB2IytRkLf+kiT39ETpm+joRFUa4XyGDqrO1FhdGStKEGvpyRACX1f6eL92I0pJrRR81UEFTQtpYDVFXHuOEObuCEB/5wADp2fuvyG6upO825pvMt135w/VxOAEfFJVPVmncwWBcTPjVc5rMBxdmf2vsBwTSHj8q65O4W2dmcPR135PTAbqpHmCmOvT2FHbziLrK7Slbil5FThi6x5i5U/fDPm1lmMB94m7rxLegvrLTbmtrWijBKbzSoHQSUUDRMOun8ypzULZpn63bj5YLo4PvAnOQDzUQQRT0AJ+oYgy1xzMY2QCjjwhWFqDpHcfKR45QyynZFywscfhGnX5gAgvoToOpm7 X-OriginatorOrg: ti.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2026 19:35:50.5952 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f1e2fb12-9924-422a-6769-08de7aee687f X-MS-Exchange-CrossTenant-Id: e5b49634-450b-4709-8abb-1e2b19b982b7 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e5b49634-450b-4709-8abb-1e2b19b982b7;Ip=[198.47.21.194];Helo=[flwvzet200.ext.ti.com] X-MS-Exchange-CrossTenant-AuthSource: BN1PEPF00005FFC.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR10MB7112 Content-Type: text/plain; charset="utf-8" The function i2c_match_id() is used to fetch the matching ID from the i2c_device_id table. This is often used to then retrieve the matching driver_data. This can be done in one step with the helper i2c_get_match_data(). This helper has a couple other benefits: * It doesn't need the i2c_device_id passed in so we do not need to have that forward declared, allowing us to remove those or move the i2c_device_id table down to its more natural spot with the other module info. * It also checks for device match data, which allows for OF and ACPI based probing. That means we do not have to manually check those first and can remove those checks. Signed-off-by: Andrew Davis --- drivers/rtc/rtc-pcf2127.c | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/drivers/rtc/rtc-pcf2127.c b/drivers/rtc/rtc-pcf2127.c index bb4fe81d3d62c..e4785c5a55d03 100644 --- a/drivers/rtc/rtc-pcf2127.c +++ b/drivers/rtc/rtc-pcf2127.c @@ -1449,10 +1449,10 @@ static const struct regmap_bus pcf2127_i2c_regmap = =3D { static struct i2c_driver pcf2127_i2c_driver; =20 static const struct i2c_device_id pcf2127_i2c_id[] =3D { - { "pcf2127", PCF2127 }, - { "pcf2129", PCF2129 }, - { "pca2129", PCF2129 }, - { "pcf2131", PCF2131 }, + { "pcf2127", (kernel_ulong_t)&pcf21xx_cfg[PCF2127] }, + { "pcf2129", (kernel_ulong_t)&pcf21xx_cfg[PCF2129] }, + { "pca2129", (kernel_ulong_t)&pcf21xx_cfg[PCF2129] }, + { "pcf2131", (kernel_ulong_t)&pcf21xx_cfg[PCF2131] }, { } }; MODULE_DEVICE_TABLE(i2c, pcf2127_i2c_id); @@ -1469,18 +1469,9 @@ static int pcf2127_i2c_probe(struct i2c_client *clie= nt) if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) return -ENODEV; =20 - if (client->dev.of_node) { - variant =3D of_device_get_match_data(&client->dev); - if (!variant) - return -ENODEV; - } else { - enum pcf21xx_type type =3D - i2c_match_id(pcf2127_i2c_id, client)->driver_data; - - if (type >=3D PCF21XX_LAST_ID) - return -ENODEV; - variant =3D &pcf21xx_cfg[type]; - } + variant =3D i2c_get_match_data(client); + if (!variant) + return -ENODEV; =20 config.max_register =3D variant->max_register, =20 --=20 2.39.2 From nobody Thu Apr 9 20:24:37 2026 Received: from BN1PR04CU002.outbound.protection.outlook.com (mail-eastus2azon11010057.outbound.protection.outlook.com [52.101.56.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3D5293DEAE6; Thu, 5 Mar 2026 19:35:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.56.57 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772739357; cv=fail; b=YCCi6a/FxWHs7YR7LjM7SvNN6iFZkXLoZWQP/ej55Y8VFpHoxb1hnyeIhxYivBwIGLq73rRnYYtzHrPGkKRCoZN3OqFVX5pbjyHlcXSLS9ImM+TCRNZt85k+3Iw2uaroohJ5Nz3kUXqQDV1FcAorcK8zJvExwds5fnTU7l5Kuac= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772739357; c=relaxed/simple; bh=/11uzt/FFWjr1NwvesafyM/XIaIc8ik0XtDtRwXLmYs=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=h7TnIJJm9SNYGeuwq40cl+gJE73sstq/ffin2TfadQkZHNxq8uyS4Z0YUrbjjR4ua6PLXh0YZVhGEqgGcFcCBQ/KS92zJNj2tpzN78SNdwsNBTB/2IkGaMrFZLJs1d2xiTjyAHo7i7k/VfkbQu7c1G0Nv1ZPIi7Zx8NoeMuYg8w= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=DHJco7+W; arc=fail smtp.client-ip=52.101.56.57 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="DHJco7+W" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=BSzcRTN54yq98zOQmeg0U1xUOTaKS/ak1pVv6nENtPZJIM28zi/WdLLwZ/ybXutsjGjxyJ6g/oqA3vBATGnMrYh4L0q47HlQuTRymm2QsdK67QM1LDBSiEkT1oMyjABRW+yb60mQ6/QqYFHQb/688uEEgwrBpQMQhMn1LqQHL8jBGiAOllE8cauAgfkIDhxmCTnhrxz+eMy/1ZUrjk6Tgj1iHGgyK+9JCgrsw61u/82J7Dw954OIY6SpI/kzh8bKgQZOMIdt/P5IhBR2SmhfJkaNZ2ZWh6UeLuv7t+kklxd5iEd87UCLCrKWu0N+vgaA/X1fS489k/7jaVAZBk9h2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Ug8T8qzlCOSzQhJU+YW1s2gONgukBDelIGY9WMG4Vm8=; b=Rb6q9GN14UYTx4Qwq06R/+EYQ4OrvplkpzkAG3j6gJT66s6IOw5F/O7RKnnOGf/ljGhZbd22wYEuLl1+x3pCEWGu44+Cr8piv6e8tVB8Et+6lmFb68Isx2hWMpmHXOY8dICJSTX2Il1MV5f9xIJjAnQk2PMz9gJ2ZNkLAj3IDugbiBxSrtQ+c0Z5SewhOvP6IyamyC/C/CJXZdsk1ydHPS6OKHAo2IMHJ6VGZxtB10ZX0Qbgb4TPUgqOHrl2d+fv/OfmCPjzfXvpNYZG5xd++2iEWUyTrp3qGATM4NaEnMMP5ZKMRt7juxHWv5xdJjbK5goRUysvD7gDpuvsK5vntQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 198.47.23.195) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=ti.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=ti.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Ug8T8qzlCOSzQhJU+YW1s2gONgukBDelIGY9WMG4Vm8=; b=DHJco7+W3rFGc3CmVob2/PVuh2aS4YbO9nkeUva/HgCwI0mAvwF+QD4o5HmmXLGaiR42SQbiAl2u0Pb+gXG9ul11uiKQMSRPphd/2WddwiKg2VMmQc/MDHQkjJ4UOVf5Rw7ryQ7f/n3EJxyaspMbvl50HVkd67NiQkS8KkpNl50= Received: from BY3PR04CA0030.namprd04.prod.outlook.com (2603:10b6:a03:217::35) by SJ5PPF7F0BE85A1.namprd10.prod.outlook.com (2603:10b6:a0f:fc02::7ad) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9654.22; Thu, 5 Mar 2026 19:35:50 +0000 Received: from MWH0EPF000A672F.namprd04.prod.outlook.com (2603:10b6:a03:217:cafe::56) by BY3PR04CA0030.outlook.office365.com (2603:10b6:a03:217::35) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9654.22 via Frontend Transport; Thu, 5 Mar 2026 19:35:50 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 198.47.23.195) smtp.mailfrom=ti.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=ti.com; Received-SPF: Pass (protection.outlook.com: domain of ti.com designates 198.47.23.195 as permitted sender) receiver=protection.outlook.com; client-ip=198.47.23.195; helo=lewvzet201.ext.ti.com; pr=C Received: from lewvzet201.ext.ti.com (198.47.23.195) by MWH0EPF000A672F.mail.protection.outlook.com (10.167.249.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9678.18 via Frontend Transport; Thu, 5 Mar 2026 19:35:50 +0000 Received: from DLEE211.ent.ti.com (157.170.170.113) by lewvzet201.ext.ti.com (10.4.14.104) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 5 Mar 2026 13:35:48 -0600 Received: from DLEE213.ent.ti.com (157.170.170.116) by DLEE211.ent.ti.com (157.170.170.113) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 5 Mar 2026 13:35:48 -0600 Received: from lelvem-mr06.itg.ti.com (10.180.75.8) by DLEE213.ent.ti.com (157.170.170.116) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20 via Frontend Transport; Thu, 5 Mar 2026 13:35:48 -0600 Received: from fllvem-mr08.itg.ti.com ([10.249.42.149]) by lelvem-mr06.itg.ti.com (8.18.1/8.18.1) with ESMTP id 625JZldh2431963; Thu, 5 Mar 2026 13:35:48 -0600 From: Andrew Davis To: Alexandre Belloni CC: , , Andrew Davis Subject: [PATCH v2 4/6] rtc: rs5c372: Remove use of i2c_match_id() Date: Thu, 5 Mar 2026 13:35:43 -0600 Message-ID: <20260305193545.796294-5-afd@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20260305193545.796294-1-afd@ti.com> References: <20260305193545.796294-1-afd@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000A672F:EE_|SJ5PPF7F0BE85A1:EE_ X-MS-Office365-Filtering-Correlation-Id: bdb68b1c-bce6-47a7-4293-08de7aee682a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|36860700016|376014|34020700016|82310400026; X-Microsoft-Antispam-Message-Info: 5BNKS1koXcwE2UjGrVrmA9/X/K7JEsfUeKSKEpk6JM/gR37bjzllEvW2jwCDd8BzJpWh1J3snG7CgTMIcseu2JwJudFVlllM3gtS6VuoAQUll4ODiNOZE7ynzv+XWtmiKuo4z5L4Ey6j+HwjMtYUN+T0HwEzloO6nKa0+3IlpjpK5PasPtzN5KNa+rgxE+Ng+zclxL8+J1JPZ+wzPQWo9Da+p+szT64s1EuSmdFNHb8eUM8gxaS6G0j9YAkRTEn51tnZveDR+5/dKUdRYoFf8qXfN4WPI2olLiEwX3jnz7KvIAjYNrRdrlOzeOB4nlMNdu5DoxLbIme2wHUG1mH9FLSt9ydaAvGIQnpUlePX2xP8F+DQiZxC4LyNWxZPV1aiJtwb0A3wZ0yyQO2oSAwCmLzqRyXx1z5ITtV0HU9tsjSng1xBlGI1gA/s9IFB0Kz12+mHowQN6hknVet6yaUy1hPl8iJ6ohx3MJV+hkHMi1oH/LCz+NUK2YXXfMQo+xASBZyvWOuOaNlKfy3i+1Ru+UGad5aoDzpjem9Sna7aVYARnz+gLwFD8XOGLlRK3tyjwOr3k2aZhAgElfPDsOA4jt1O1qyhhPGhd1Ix7E5cya5kl75ZaxKs4J5065ZhfyGmXeHmFPUAoV3CV2c/aQ3t6csYBSsVqGCVIJQaipDIZAaIfGLwGNSB3RLPZC4uhtGdlIGf7XB2qtu443lXFuZDzy6hLrTV0lhkM5cl21Vrtl/qoqx5bjGxQ7XBcpUQ8BbUIQBDFKmgy9/Cvn5YurUtTQ== X-Forefront-Antispam-Report: CIP:198.47.23.195;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:lewvzet201.ext.ti.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(1800799024)(36860700016)(376014)(34020700016)(82310400026);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: HHVH/d9LspgY7c6TO9SpMa88s1ztbjGpq5HOEPSxSnJWkKX/HZh1OC/WkxHqIjpV4V904i+bTtWRw0vTtQBprQNgtHNSxvwUsETfXEs4/VN1pRBxx4CjKSgTQiH4u8I0nwKTUktJxppC+EOIchjO9ek8m0FCTNy7hmSebB3veI+waAXLedIfW0pU1IdOudpit7sWCxjEZ6v8ow4XAqU+vSIKAfhsl1INnc0qT4hInTQ9YfDYYkT4ro4Ls/bEYlli7k07bHUdYgClhaVp4QixdX8UCHlKRC1z6arZy1YpdfafRxg8Fjvuq8nv8UyTo/ce5mlpwgywZ1p+BvmbbY7LbSuRmB7XhPHrySbwrkQjnfXCPNkTJ92KYk0u9VpThlrxrQrV2GKudNmbqrf5FqTD1zMCHwbn+kz34DrYQv/TkI+pVWCsA4MJrL+1P6rv34Lq X-OriginatorOrg: ti.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2026 19:35:50.0336 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bdb68b1c-bce6-47a7-4293-08de7aee682a X-MS-Exchange-CrossTenant-Id: e5b49634-450b-4709-8abb-1e2b19b982b7 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e5b49634-450b-4709-8abb-1e2b19b982b7;Ip=[198.47.23.195];Helo=[lewvzet201.ext.ti.com] X-MS-Exchange-CrossTenant-AuthSource: MWH0EPF000A672F.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ5PPF7F0BE85A1 Content-Type: text/plain; charset="utf-8" The function i2c_match_id() is used to fetch the matching ID from the i2c_device_id table. This is often used to then retrieve the matching driver_data. This can be done in one step with the helper i2c_get_match_data(). This helper has a couple other benefits: * It doesn't need the i2c_device_id passed in so we do not need to have that forward declared, allowing us to remove those or move the i2c_device_id table down to its more natural spot with the other module info. * It also checks for device match data, which allows for OF and ACPI based probing. That means we do not have to manually check those first and can remove those checks. Signed-off-by: Andrew Davis --- drivers/rtc/rtc-rs5c372.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/rtc/rtc-rs5c372.c b/drivers/rtc/rtc-rs5c372.c index f8fab0205f8cc..936f4f05c8c7a 100644 --- a/drivers/rtc/rtc-rs5c372.c +++ b/drivers/rtc/rtc-rs5c372.c @@ -825,12 +825,7 @@ static int rs5c372_probe(struct i2c_client *client) =20 rs5c372->client =3D client; i2c_set_clientdata(client, rs5c372); - if (client->dev.of_node) { - rs5c372->type =3D (uintptr_t)of_device_get_match_data(&client->dev); - } else { - const struct i2c_device_id *id =3D i2c_match_id(rs5c372_id, client); - rs5c372->type =3D id->driver_data; - } + rs5c372->type =3D (uintptr_t)i2c_get_match_data(client); =20 /* we read registers 0x0f then 0x00-0x0f; skip the first one */ rs5c372->regs =3D &rs5c372->buf[1]; --=20 2.39.2 From nobody Thu Apr 9 20:24:37 2026 Received: from CY7PR03CU001.outbound.protection.outlook.com (mail-westcentralusazon11010025.outbound.protection.outlook.com [40.93.198.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 755033CC9FF; Thu, 5 Mar 2026 19:35:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.93.198.25 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772739354; cv=fail; b=c3WgFaRKDQ9pKyDjtj2MOtOVORXkfE3ii5s862qClY/N5H7Txb2sA7A8S7yVT0RS1wu2zBYWCWEXrq51ndCgof8gYuO3gmDSUxwXM4OtbjgnZU1AdDYWtBYjupXXskE2eFMRAW2HlcZkCNVUYVQcUc8jOYwSXm1/Ux58X+X/yq4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772739354; c=relaxed/simple; bh=yBY+i3mID+D/lmIiTiEk6CwBtstAixSvU6pFHSRjpnw=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=q5EHoNDbb3glAfIQvmUn2RMPS4Q1OsstuTPWEdENIxsaDHokufpr3DssEAqI4Xvg/rsUrpmv3iB53UB5OqIsF/qlXnJZ7udI8N2ExVo4UpC54aE5yJ6DX2PGbsFHI70P1eydJGHGKwOeRKZgN6wR68ZezPENT9MT/zkKcuAPTk4= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=MIxS+/4S; arc=fail smtp.client-ip=40.93.198.25 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="MIxS+/4S" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=aFFJ9tGwOsAaW+R8MWESj9RfTLsom4zXuRaUu1A+xHGTXG2gFf/kiyPV6w7kPfyo1Dkv3e6KatwMqL3xVGEz5hnzhgKpyxeUnElpduLCIvPZ/sOkgqtTnKdFBWO9wqc6YeKVjHq0aYWE0ihGQL41fBxsy6bIIwN76/1eaAi1GoHLbjsLIQPTIttkYTFK1DQUIrn9FJctkJARupp/+VZpJUvFL9tSSzISEB1Goyxfa3hB3Qh7MKRL7MvYs498SjNGb/QO8r/7OWZr5aVXJPiHIiYWQx96ODkbYTAVkjgLXdl/d3t/Bpo1KxntUM7cbOzqb3wnQG3wDJdhaSUEPRumpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=G6prMlOOcAuhViCfc5PB7H9XlivXhRHYXUYRWq1CHrM=; b=oJ5ywgCy8CoZyb4hrlRP1RD7b/BcvXBLcFHtq7F9hpUK73lJ8Uk4ta2SqX9n9Pam9gFBtRCglSkqago5eDdP2oXZhOaKvBmVcunzQSDRm3yV4Wc5Or/+anBzN4cGCQWZnCmFAR7NM5jT3LyNdGnuvUeZQj/HwXpWJNsp8gmy5DkS9+87W/+4aydrsnod+cVQ84Z1uKk+78I/itbFPH/nIQWwMMbj/BlIlBAt8a3SKwVEB0jRZJ+tBk++7ko7XYxTZ3wNaBgX3fWX60P04c0TiVSu9oMsWQqES0hh06GLEOpvQHJRqjiDY1sj4SMvNXmvQmNlJ9+zbRAxjr2fM/dERw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 198.47.23.194) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=ti.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=ti.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=G6prMlOOcAuhViCfc5PB7H9XlivXhRHYXUYRWq1CHrM=; b=MIxS+/4S7ePiiaUdP0E7X3Uy6Y39T/G2Px260deTfnwCYZsErUTmTXQmBDptn2g4DkxXGX1k58pXhaZHE1J+w3y+XZZbNPNPVO+tX0eQ/TRqeH7sEyywzeFbDST3/ojT8zOblH+iMxh+XFRQDfpRZ0Cx6QBum8OBGOn3HvGqhvA= Received: from MN2PR14CA0005.namprd14.prod.outlook.com (2603:10b6:208:23e::10) by CH0PR10MB4891.namprd10.prod.outlook.com (2603:10b6:610:c1::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9654.22; Thu, 5 Mar 2026 19:35:50 +0000 Received: from BL02EPF00021F69.namprd02.prod.outlook.com (2603:10b6:208:23e:cafe::4a) by MN2PR14CA0005.outlook.office365.com (2603:10b6:208:23e::10) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9678.18 via Frontend Transport; Thu, 5 Mar 2026 19:35:50 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 198.47.23.194) smtp.mailfrom=ti.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=ti.com; Received-SPF: Pass (protection.outlook.com: domain of ti.com designates 198.47.23.194 as permitted sender) receiver=protection.outlook.com; client-ip=198.47.23.194; helo=lewvzet200.ext.ti.com; pr=C Received: from lewvzet200.ext.ti.com (198.47.23.194) by BL02EPF00021F69.mail.protection.outlook.com (10.167.249.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9678.18 via Frontend Transport; Thu, 5 Mar 2026 19:35:50 +0000 Received: from DLEE211.ent.ti.com (157.170.170.113) by lewvzet200.ext.ti.com (10.4.14.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 5 Mar 2026 13:35:48 -0600 Received: from DLEE210.ent.ti.com (157.170.170.112) by DLEE211.ent.ti.com (157.170.170.113) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 5 Mar 2026 13:35:48 -0600 Received: from lelvem-mr06.itg.ti.com (10.180.75.8) by DLEE210.ent.ti.com (157.170.170.112) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20 via Frontend Transport; Thu, 5 Mar 2026 13:35:48 -0600 Received: from fllvem-mr08.itg.ti.com ([10.249.42.149]) by lelvem-mr06.itg.ti.com (8.18.1/8.18.1) with ESMTP id 625JZldi2431963; Thu, 5 Mar 2026 13:35:48 -0600 From: Andrew Davis To: Alexandre Belloni CC: , , Andrew Davis Subject: [PATCH v2 5/6] rtc: rv8803: Remove use of i2c_match_id() Date: Thu, 5 Mar 2026 13:35:44 -0600 Message-ID: <20260305193545.796294-6-afd@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20260305193545.796294-1-afd@ti.com> References: <20260305193545.796294-1-afd@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF00021F69:EE_|CH0PR10MB4891:EE_ X-MS-Office365-Filtering-Correlation-Id: 17cbfe5e-9714-4073-3cc5-08de7aee683b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700016|1800799024|34020700016|376014|82310400026; X-Microsoft-Antispam-Message-Info: TsIkIvorXdpBBhNN8qxSn37S3yUUM5Jiar283ot5iUtZfSW1nP7CVZn4ZGJvQoYB6uhNa2nUcXjwrtM17GjT+Rek1sgtFqpV3MQu8IdngNdhR4o50P8Djt3rOIB+ZfBt+4Fgm+LdkS92XjtJw9sPbsoCTh0gvxlLYXN8yPIYvf8dI+Gd7ARLvIM5uIul3U2o2AIj/noyQ6bkJDJs8TB3KktKRs5rqFdZML3c9t6o3J+SkA/NAG5BXsVulhZ9o/A8AyECu0xQDsU2HDCID8KUO8FZ0oBKfoqMieVcID/FdiyEklmKfagiShYO9dz5fL8LOCdekXSPnP49IlZeN1WGRdNE4tOhH6SPdKMb59cmcqJnL4bqI8Hj/Zq8Y2O38FFyzjM5poD1+m0ku78eMdTAoQKZiip85EwNOqR2BHbDQZ5GHS1wp/keS5PCCrikhCnepQkbf/x5X1y7pxZlt4KxE/C2+hIjNLEgS/k5KjZW527UzzzAxlZRk/mk8rrTj8Pi4asFI1+1yFN63/DKSXm6QyQD56raEy6gdI2jnqXs0eT36Avx5Phyij+ItJBZKAj+7pQslT2RGMshzAkyx2H44Pg1kISJDGudlbssbpotRsn2sWDPwZ/6BdZ/NVjOvDijDtOxY77nthiNgc0xWNNzLa5VXW1nUZTngNVVAY60yxycIE2FIkHpYDWE1uDZYWgFwOh2UBUTCbWSXXbeX8/BMVar7MfvFtwYZB2n7weHRk93yYb6eE168ZWif848rYbalnA4adzcODFdgLZLi534Yg== X-Forefront-Antispam-Report: CIP:198.47.23.194;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:lewvzet200.ext.ti.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(36860700016)(1800799024)(34020700016)(376014)(82310400026);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: pBqQ+TBrcXLVXIOcJDJ3IxvoQDfCPjMnXIjqlgrVEgJam0KVsMlo85H4Hdj2QUmiC5YW2PN2oMmFCtoaG+5VLtwZljXSAwGTwLmYoXZ/fw0kGJkczz58KpOuKDv0fZOG0sy1Mlkrz94qjK17ioxieZbMHSJPwXa7B8MjhdZaKPJrrhrSydJ1Zv2lSLECDkaFdpSg8KLGxwaMdZQNU0cN1jh4zjvKC49a6/y6TfK1o2aQL2D0hyUqJsGpVaoDWubYdA7mXRYuwYq7p1ZPAEozIGQCi7NWsN4Dm6igN7fKIjJmkFz8cp+gwCRDSW54Gfy9kiXxRvkv94Qlo5hRELhFclBMntY0IxHV/WBHc3YhpGAvrNpirm0MNFBO+k36STvK11B53ar2D66VxIX7XptGpmjwK5bzLqE7QA1XP2vi3kNmxJjxBWg5ZSZXcSg+miVg X-OriginatorOrg: ti.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2026 19:35:50.1506 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 17cbfe5e-9714-4073-3cc5-08de7aee683b X-MS-Exchange-CrossTenant-Id: e5b49634-450b-4709-8abb-1e2b19b982b7 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e5b49634-450b-4709-8abb-1e2b19b982b7;Ip=[198.47.23.194];Helo=[lewvzet200.ext.ti.com] X-MS-Exchange-CrossTenant-AuthSource: BL02EPF00021F69.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR10MB4891 Content-Type: text/plain; charset="utf-8" The function i2c_match_id() is used to fetch the matching ID from the i2c_device_id table. This is often used to then retrieve the matching driver_data. This can be done in one step with the helper i2c_get_match_data(). This helper has a couple other benefits: * It doesn't need the i2c_device_id passed in so we do not need to have that forward declared, allowing us to remove those or move the i2c_device_id table down to its more natural spot with the other module info. * It also checks for device match data, which allows for OF and ACPI based probing. That means we do not have to manually check those first and can remove those checks. Signed-off-by: Andrew Davis --- drivers/rtc/rtc-rv8803.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/rtc/rtc-rv8803.c b/drivers/rtc/rtc-rv8803.c index 4e9e04cbec89a..2bf988a89fd7b 100644 --- a/drivers/rtc/rtc-rv8803.c +++ b/drivers/rtc/rtc-rv8803.c @@ -667,13 +667,7 @@ static int rv8803_probe(struct i2c_client *client) =20 mutex_init(&rv8803->flags_lock); rv8803->client =3D client; - if (client->dev.of_node) { - rv8803->type =3D (uintptr_t)of_device_get_match_data(&client->dev); - } else { - const struct i2c_device_id *id =3D i2c_match_id(rv8803_id, client); - - rv8803->type =3D id->driver_data; - } + rv8803->type =3D (uintptr_t)i2c_get_match_data(client); i2c_set_clientdata(client, rv8803); =20 flags =3D rv8803_read_reg(client, RV8803_FLAG); --=20 2.39.2 From nobody Thu Apr 9 20:24:37 2026 Received: from MW6PR02CU001.outbound.protection.outlook.com (mail-westus2azon11012058.outbound.protection.outlook.com [52.101.48.58]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D7E2A37D10E; Thu, 5 Mar 2026 19:35:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.48.58 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772739354; cv=fail; b=j/b1HHTYUQjLUoigsdXQ3RV7BAKvX4nNNHnUglXsDNwLc+OBQK+ey3Kzna+UgdAFg7cXqsd3KF35IWoP0idhUeRLAZf9d4GmjPHzybpZpHoLK3D7uAFmEj2khrAbj7NfZlC6FjpTa7knVHHYtaaopkXdNg6KrVenwzqQ+p2fT6g= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772739354; c=relaxed/simple; bh=fW+lAEDPnXdWvfhDzMjDacxmVg0Mhvn3bk8djksigBE=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ry2nGbeDhLHf1AXUpb9MVnWJkf4XF1WypCodVs4wuw5vg4Hs3984LYQLr1D3O/UQyaa136q3b09++Q+7JmZVS9JyeAH6pC6eJRId5vQGsH3Hh9r1YIrTr6OTU4V0sYXaPfyJVfu5OM2ZpMWylPnRhsjHnRjdfv9QQtwq+xLuVaM= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=ShC8Y3F3; arc=fail smtp.client-ip=52.101.48.58 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="ShC8Y3F3" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=vX5I6qUIkhhWskxgsYpNcB5I7X36Ew0sPfR2ojz63H7FCqZMi30qRO8qIOGMBlLkxg3HcLZdsZm3nL0qEHn/JA6RFz8j3NxjPPwf0z6mogl9y3PbfYGWdtvoQv6iciU/QBQLg/01AsVRrlEZ0vblzxYfx+ANWpRRsXnRuBkUzypHSsbTId5FQueoeHSr2S2PDSaGkZNJ03+trdNKHcFewntFKwIa07ME0YCJWkxG58tAQYLcjbMMyEJw7+6Bo7IBrW+bMNkBoDooW5lTpxS7Ww0JuKGqADFISQuynJwDOxR36lS3PiA77oUExwoeoTvEkcaEbEwnmltBMoHsr4DKWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=apk1ETQGsnnLL4B1h138a7ja7n8k5Mhz6P26gQxs9S0=; b=kZSpMlbnPUf5/TFoYqYM6lNp1Lk4bSkkiyJrpQ0poR0s6hhK8U4b+F2Z4okbbx1HgxeWsOSXnst3GC3tYU+5D3MM4a+08ddZ4stZFAnfwgbTfLtzrjLnVZ9BxO27uwabhdv3i3ZNFJOyxOpPEFSgYebGC2AI4mYHL547cthtGBJdRF+vOPiDtaSl+7yZ1WlWDJn+w1W+pMhtkxmMacD1lkL+TMgW0KMYNePrBp83y+V1bGke0XCBmI/yKsIr8XRwDvivJHT1N9MQf8YeMuPu8r6t9hYH112U2p616n9TL0c8na36UbzESiPlVgNzZPdmCDXQBhtBMX0ZH2VowSL7PA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 198.47.23.194) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=ti.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=ti.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=apk1ETQGsnnLL4B1h138a7ja7n8k5Mhz6P26gQxs9S0=; b=ShC8Y3F34d4x2kWIVgF36ftkwELaNmek6/8ZTl+qVElO7asgCqgvVN6VKRni4psjMRVSPFmRYhHCY5nfdCtpTYbid32FO/oRwgommcppgI52ry3V0DPM1epQuAlUE1OIsxaIg25qD767u+9XxeIGRDQaH/GOoG86mxu5nwKAQwk= Received: from MN2PR14CA0007.namprd14.prod.outlook.com (2603:10b6:208:23e::12) by LV3PR10MB8155.namprd10.prod.outlook.com (2603:10b6:408:28f::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9678.18; Thu, 5 Mar 2026 19:35:50 +0000 Received: from BL02EPF00021F69.namprd02.prod.outlook.com (2603:10b6:208:23e:cafe::2e) by MN2PR14CA0007.outlook.office365.com (2603:10b6:208:23e::12) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9654.23 via Frontend Transport; Thu, 5 Mar 2026 19:35:45 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 198.47.23.194) smtp.mailfrom=ti.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=ti.com; Received-SPF: Pass (protection.outlook.com: domain of ti.com designates 198.47.23.194 as permitted sender) receiver=protection.outlook.com; client-ip=198.47.23.194; helo=lewvzet200.ext.ti.com; pr=C Received: from lewvzet200.ext.ti.com (198.47.23.194) by BL02EPF00021F69.mail.protection.outlook.com (10.167.249.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9678.18 via Frontend Transport; Thu, 5 Mar 2026 19:35:50 +0000 Received: from DLEE215.ent.ti.com (157.170.170.118) by lewvzet200.ext.ti.com (10.4.14.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 5 Mar 2026 13:35:49 -0600 Received: from DLEE215.ent.ti.com (157.170.170.118) by DLEE215.ent.ti.com (157.170.170.118) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 5 Mar 2026 13:35:48 -0600 Received: from lelvem-mr06.itg.ti.com (10.180.75.8) by DLEE215.ent.ti.com (157.170.170.118) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20 via Frontend Transport; Thu, 5 Mar 2026 13:35:48 -0600 Received: from fllvem-mr08.itg.ti.com ([10.249.42.149]) by lelvem-mr06.itg.ti.com (8.18.1/8.18.1) with ESMTP id 625JZldj2431963; Thu, 5 Mar 2026 13:35:48 -0600 From: Andrew Davis To: Alexandre Belloni CC: , , Andrew Davis Subject: [PATCH v2 6/6] rtc: rx8025: Remove use of i2c_match_id() Date: Thu, 5 Mar 2026 13:35:45 -0600 Message-ID: <20260305193545.796294-7-afd@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20260305193545.796294-1-afd@ti.com> References: <20260305193545.796294-1-afd@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF00021F69:EE_|LV3PR10MB8155:EE_ X-MS-Office365-Filtering-Correlation-Id: ec30aabe-5357-459e-e204-08de7aee6895 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|34020700016|1800799024|36860700016|82310400026|376014; X-Microsoft-Antispam-Message-Info: nky/Hf/D7vbWmasIkMzWAFGsDhiiFizE6BNNcF0cVyxKyEn2Udofn7l8s17eycFVX8WX5PoQ1uaa7AYyQCe3f6wruELWapBSyuaqAP31SxEiGfs7EYbZbB8hQjEvEIAfSeZjPZSsGoGal2k8SQT81JEmzim/WANJf4m3JS1C1udVRUbqnMXxbiH1zYyqz1rBk0QKDOo0Dx4TVMZF+mooZ2npXjQFyIq2EmsJ9DQatIm0nkRFwVemZMETDD/S9kXny9Dme/YZWR4zfRmqHay8MaEJ3qI3aLicINyDrCBUIhmRvqVoNyytWt7+l5vnEo9SGI1Lut/QN8sLrwjhduOmsIFOjye38B0KIXJ0E81d+XB6YsPpSOPbF+quGPjPVhSt6QPgNa2UJcVl3+23jcU1g8JiEAsNupfDULVrqrhrUboOqMjAnm5NDACt6iBJ7Nul99YVsd9pZU+/nCPeZC/4teQFQs3q7FM+Q/AC4KEfjypjK99ufk1HQSnkLkDD6Iogh90YsmX9jGNA/dXT0GnAowg6YzOZDoLHcDjSIe/eL8UWCXTv0Is1oScU9j+lzNQ4Jy+UNBg6nNkaIZr0JvpEF3W2thmc0S4oYhZYmB/E0FkbL/BhL4H9ogGHC5kF5jkQ3uKHpRaWzhRJbWjqM8LrAXchq988/NJDWN6MzK9noJmBNWV0gtRbMOTLWxd+KRhG03Bpaiq5f9gIysaPni6w6FX0U+4zL3lhDcsUQK7PWXQvUkleGyhFe1l9qeKA8yFi+OYbgDw7hDZLXn4a0D3Faw== X-Forefront-Antispam-Report: CIP:198.47.23.194;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:lewvzet200.ext.ti.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(34020700016)(1800799024)(36860700016)(82310400026)(376014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: nY2G+QiiuJjkCF6DXniL8N9DcNAmmPjfGLgtfCXcdd5BZvgcGI8Ioo/yhVGzZmtuYltc2lcHijEseXO6rj6Z9/mfjk7bv3Wxbe2ENzL73coIhTZICDfsRtXChF4froua4uI9wP7SQez1lGpSmP17/wGesSFdj495MwHz5u7lnzMhtVMPOHGRGtoa9mmE83f8ffIYcFb8+LDZCVqZKqaYGeNoDFmdXmqAZvof306lvUvm3HUIaNljj5QlyNYpgqjk3KUWejtlWgJNL7frMJf+azF+Ejedn+R4J3AFITUq0au8HzI3jz8daBL5CjtkkgW/quY8jFR9QA8xyTm3IW11T8DDet7L3bYES0AqUBEGWrzmCWvx2Q04I1Or/XeGh5KuS/rIuKKWAg1cKB0lqrg/mxk49aM4PHnPE0NTKNXMR6XdG2fFWhLoF12cPd6lht+x X-OriginatorOrg: ti.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2026 19:35:50.7482 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ec30aabe-5357-459e-e204-08de7aee6895 X-MS-Exchange-CrossTenant-Id: e5b49634-450b-4709-8abb-1e2b19b982b7 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e5b49634-450b-4709-8abb-1e2b19b982b7;Ip=[198.47.23.194];Helo=[lewvzet200.ext.ti.com] X-MS-Exchange-CrossTenant-AuthSource: BL02EPF00021F69.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV3PR10MB8155 Content-Type: text/plain; charset="utf-8" The function i2c_match_id() is used to fetch the matching ID from the i2c_device_id table. This is often used to then retrieve the matching driver_data. This can be done in one step with the helper i2c_get_match_data(). This helper has a couple other benefits: * It doesn't need the i2c_device_id passed in so we do not need to have that forward declared, allowing us to remove those or move the i2c_device_id table down to its more natural spot with the other module info. * It also checks for device match data, which allows for OF and ACPI based probing. That means we do not have to manually check those first and can remove those checks. Signed-off-by: Andrew Davis --- drivers/rtc/rtc-rx8025.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-rx8025.c b/drivers/rtc/rtc-rx8025.c index ced6e7adfe8d0..c57081f9e02b4 100644 --- a/drivers/rtc/rtc-rx8025.c +++ b/drivers/rtc/rtc-rx8025.c @@ -522,7 +522,6 @@ static const struct attribute_group rx8025_attr_group = =3D { =20 static int rx8025_probe(struct i2c_client *client) { - const struct i2c_device_id *id =3D i2c_match_id(rx8025_id, client); struct i2c_adapter *adapter =3D client->adapter; struct rx8025_data *rx8025; int err =3D 0; @@ -540,8 +539,7 @@ static int rx8025_probe(struct i2c_client *client) =20 i2c_set_clientdata(client, rx8025); =20 - if (id) - rx8025->model =3D id->driver_data; + rx8025->model =3D (uintptr_t)i2c_get_match_data(client); =20 err =3D rx8025_init_client(client); if (err) --=20 2.39.2