From patchwork Fri Jul 21 07:00:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Biju Das X-Patchwork-Id: 13321435 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 AC624C001DC for ; Fri, 21 Jul 2023 07:00:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230023AbjGUHAa (ORCPT ); Fri, 21 Jul 2023 03:00:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230010AbjGUHA2 (ORCPT ); Fri, 21 Jul 2023 03:00:28 -0400 Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C5C442719; Fri, 21 Jul 2023 00:00:27 -0700 (PDT) X-IronPort-AV: E=Sophos;i="6.01,220,1684767600"; d="scan'208";a="170340925" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 21 Jul 2023 16:00:27 +0900 Received: from localhost.localdomain (unknown [10.226.92.55]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id B213E40029DC; Fri, 21 Jul 2023 16:00:24 +0900 (JST) From: Biju Das To: Luca Ceresoli , Michael Turquette , Stephen Boyd Cc: Biju Das , linux-clk@vger.kernel.org, Geert Uytterhoeven , Prabhakar Mahadev Lad , linux-renesas-soc@vger.kernel.org, Marek Vasut Subject: [PATCH v2 1/2] clk: vc5: Use i2c_get_match_data() instead of device_get_match_data() Date: Fri, 21 Jul 2023 08:00:18 +0100 Message-Id: <20230721070019.96627-2-biju.das.jz@bp.renesas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230721070019.96627-1-biju.das.jz@bp.renesas.com> References: <20230721070019.96627-1-biju.das.jz@bp.renesas.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org The device_get_match_data(), is to get match data for firmware interfaces such as just OF/ACPI. This driver has I2C matching table as well. Use i2c_get_match_data() to get match data for I2C, ACPI and DT-based matching. Signed-off-by: Biju Das Reviewed-by: Marek Vasut Reviewed-by: Geert Uytterhoeven Reviewed-by: Luca Ceresoli --- v1->v2: * Added Rb tags from Geert and Marek. * Removed error check as all tables have data pointers. * Retained Rb tag as the change is trivial. --- drivers/clk/clk-versaclock5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/clk-versaclock5.c b/drivers/clk/clk-versaclock5.c index 72b432f93b5f..17cbb30d20ad 100644 --- a/drivers/clk/clk-versaclock5.c +++ b/drivers/clk/clk-versaclock5.c @@ -955,7 +955,7 @@ static int vc5_probe(struct i2c_client *client) i2c_set_clientdata(client, vc5); vc5->client = client; - vc5->chip_info = device_get_match_data(&client->dev); + vc5->chip_info = i2c_get_match_data(client); vc5->pin_xin = devm_clk_get(&client->dev, "xin"); if (PTR_ERR(vc5->pin_xin) == -EPROBE_DEFER) From patchwork Fri Jul 21 07:00:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Biju Das X-Patchwork-Id: 13321436 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 A237BEB64DC for ; Fri, 21 Jul 2023 07:00:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230112AbjGUHAf (ORCPT ); Fri, 21 Jul 2023 03:00:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230074AbjGUHAc (ORCPT ); Fri, 21 Jul 2023 03:00:32 -0400 Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1EAD0270B; Fri, 21 Jul 2023 00:00:31 -0700 (PDT) X-IronPort-AV: E=Sophos;i="6.01,220,1684767600"; d="scan'208";a="170340947" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 21 Jul 2023 16:00:30 +0900 Received: from localhost.localdomain (unknown [10.226.92.55]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 083904006190; Fri, 21 Jul 2023 16:00:27 +0900 (JST) From: Biju Das To: Alex Helms , Michael Turquette , Stephen Boyd Cc: Biju Das , linux-clk@vger.kernel.org, Geert Uytterhoeven , Prabhakar Mahadev Lad , linux-renesas-soc@vger.kernel.org, Marek Vasut Subject: [PATCH v2 2/2] clk: vc7: Use i2c_get_match_data() instead of device_get_match_data() Date: Fri, 21 Jul 2023 08:00:19 +0100 Message-Id: <20230721070019.96627-3-biju.das.jz@bp.renesas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230721070019.96627-1-biju.das.jz@bp.renesas.com> References: <20230721070019.96627-1-biju.das.jz@bp.renesas.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org The device_get_match_data(), is to get match data for firmware interfaces such as just OF/ACPI. This driver has I2C matching table as well. Use i2c_get_match_data() to get match data for I2C, ACPI and DT-based matching. Signed-off-by: Biju Das Reviewed-by: Marek Vasut Reviewed-by: Geert Uytterhoeven --- v1->v2: * Added Rb tags from Geert and Marek. * Removed error check as all tables have data pointers. * Retained Rb tag as the change is trivial. --- drivers/clk/clk-versaclock7.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/clk-versaclock7.c b/drivers/clk/clk-versaclock7.c index 7f4361084882..9ab35c1af0ff 100644 --- a/drivers/clk/clk-versaclock7.c +++ b/drivers/clk/clk-versaclock7.c @@ -1108,7 +1108,7 @@ static int vc7_probe(struct i2c_client *client) i2c_set_clientdata(client, vc7); vc7->client = client; - vc7->chip_info = device_get_match_data(&client->dev); + vc7->chip_info = i2c_get_match_data(client); vc7->pin_xin = devm_clk_get(&client->dev, "xin"); if (PTR_ERR(vc7->pin_xin) == -EPROBE_DEFER) {