From patchwork Sun May 7 13:39:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 13233729 X-Patchwork-Delegate: geert@linux-m68k.org 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 EFFEEC7EE24 for ; Sun, 7 May 2023 13:39:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231261AbjEGNjX (ORCPT ); Sun, 7 May 2023 09:39:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231194AbjEGNjW (ORCPT ); Sun, 7 May 2023 09:39:22 -0400 Received: from mout-p-201.mailbox.org (mout-p-201.mailbox.org [IPv6:2001:67c:2050:0:465::201]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09B2C1635F; Sun, 7 May 2023 06:39:18 -0700 (PDT) Received: from smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:b231:465::202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4QDlrh43Zkz9shP; Sun, 7 May 2023 15:39:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1683466756; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=4fgQ2AA/ZP9Q31JC0thF0rs1ha1creCyXIytqfAePqI=; b=I6CRR4WJAV4eLopU79RVgaciorlZZBFTitS7Gq96uHlp6WtKeX5e1uIHhkVH+f4IBL+r9Y L5xfxGPCEMy/XezGJ7xj1vFLSm0mvLrJrmfuCg4ZUIWjKxflfgjGbmiCbAeeP6QHGtAgw+ STpYnEaTUkD0RyyXQvNsDuq43Q26gpry17oVSUP5rjgPLYIsFnNS35/oYitplaOeCZcOZr D86dR0g0HjAUzf0ouLRH4sVozyjZjVmUg4rdGEqDJd5MjjZNdqP7mYVRx1TDAt84FqiHAC /I84Gaig1maGZULrcGdDpzX51E6js4kjGM7LqI3HMI9goy9PFCxfPbIZa0Bepw== From: Marek Vasut DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1683466754; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=4fgQ2AA/ZP9Q31JC0thF0rs1ha1creCyXIytqfAePqI=; b=OjKWptYTBwxm9l71hoPz77JGVVOFOOS2aLwGh0OR2mRPeIEenK0qmSxHi4DMB8OzlXgTfX FLU8C67jfS86eLLzGTaHNDrkyorJmYTROVU7ZZvIVRpnq+wdkQ9fAsdBaHbUrkA0xhMP/N ayS5ujffUUe58Vfq6il5O9rSS7bG1ue4Mv5El5pg3OPoTMInVVDYD3e4+kG6ai9uHvVvb8 iKPTy3XNT6aiGKEwIX6r0lomm/xRI25mR0CAEam2SBSHv8CK1HmfQnIMzTCmCP+nGlhD7r tjSgAaDC4sorSTr0CGQeVjHxnjB2z+6K2lArm6NkqzD+cfVLSwnHS6v9LpDI4Q== To: linux-clk@vger.kernel.org Cc: Marek Vasut , Alex Helms , Geert Uytterhoeven , Luca Ceresoli , Magnus Damm , Michael Turquette , Nathan Chancellor , Nick Desaulniers , Stephen Boyd , Tom Rix , linux-renesas-soc@vger.kernel.org Subject: [PATCH 1/3] clk: vc5: Fix .driver_data content in i2c_device_id Date: Sun, 7 May 2023 15:39:04 +0200 Message-Id: <20230507133906.15061-1-marek.vasut+renesas@mailbox.org> MIME-Version: 1.0 X-MBO-RS-ID: 8ad0a7f78ccef191bd9 X-MBO-RS-META: emtkqf589wnhogos4d39cky6th4ssjrj X-Rspamd-Queue-Id: 4QDlrh43Zkz9shP Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org The .driver_data content in i2c_device_id table must match the .data content in of_device_id table, else device_get_match_data() would return bogus value on i2c_device_id match. Align the two tables. The i2c_device_id table is now converted from of_device_id using 's@.compatible = "idt,\([^"]\+"\), .data = \(.*\)@"\1, .driver_data = (kernel_ulong_t)\2@' Fixes: 9adddb01ce5f ("clk: vc5: Add structure to describe particular chip features") Signed-off-by: Marek Vasut Reviewed-by: Luca Ceresoli Reviewed-by: Geert Uytterhoeven --- Cc: Alex Helms Cc: Geert Uytterhoeven Cc: Luca Ceresoli Cc: Magnus Damm Cc: Michael Turquette Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Stephen Boyd Cc: Tom Rix Cc: linux-clk@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org --- drivers/clk/clk-versaclock5.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/clk/clk-versaclock5.c b/drivers/clk/clk-versaclock5.c index fa71a57875ce..5452471b7ba5 100644 --- a/drivers/clk/clk-versaclock5.c +++ b/drivers/clk/clk-versaclock5.c @@ -1271,14 +1271,14 @@ static const struct vc5_chip_info idt_5p49v6975_info = { }; static const struct i2c_device_id vc5_id[] = { - { "5p49v5923", .driver_data = IDT_VC5_5P49V5923 }, - { "5p49v5925", .driver_data = IDT_VC5_5P49V5925 }, - { "5p49v5933", .driver_data = IDT_VC5_5P49V5933 }, - { "5p49v5935", .driver_data = IDT_VC5_5P49V5935 }, - { "5p49v60", .driver_data = IDT_VC6_5P49V60 }, - { "5p49v6901", .driver_data = IDT_VC6_5P49V6901 }, - { "5p49v6965", .driver_data = IDT_VC6_5P49V6965 }, - { "5p49v6975", .driver_data = IDT_VC6_5P49V6975 }, + { "5p49v5923", .driver_data = (kernel_ulong_t)&idt_5p49v5923_info }, + { "5p49v5925", .driver_data = (kernel_ulong_t)&idt_5p49v5925_info }, + { "5p49v5933", .driver_data = (kernel_ulong_t)&idt_5p49v5933_info }, + { "5p49v5935", .driver_data = (kernel_ulong_t)&idt_5p49v5935_info }, + { "5p49v60", .driver_data = (kernel_ulong_t)&idt_5p49v60_info }, + { "5p49v6901", .driver_data = (kernel_ulong_t)&idt_5p49v6901_info }, + { "5p49v6965", .driver_data = (kernel_ulong_t)&idt_5p49v6965_info }, + { "5p49v6975", .driver_data = (kernel_ulong_t)&idt_5p49v6975_info }, { } }; MODULE_DEVICE_TABLE(i2c, vc5_id);