Received: by 2002:a05:6a10:83d0:0:0:0:0 with SMTP id o16csp70293pxh; Thu, 7 Apr 2022 14:16:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxnLsUOA/HoUzjupN2QPZrkUE5ECZ5Di2lFI1Thk0qPKO6dBVTDYdR/A0aGk7LkfJVYOyUr X-Received: by 2002:a9d:1713:0:b0:5cd:a4c7:be79 with SMTP id i19-20020a9d1713000000b005cda4c7be79mr5448002ota.367.1649366180516; Thu, 07 Apr 2022 14:16:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649366180; cv=none; d=google.com; s=arc-20160816; b=ZS4lMWH6C8oEE1rsqvxjppPFygB+PMXbXZJcGmVyrfoCV4VQCYKonOl01VNunDjVUv RZoN4+owm+jMO24cooE1a3ItEFVP1J/mrdSfrLDoqfNApLEIXrfzSX0OLzGG4TvuSBSU QsqSprvTlhdaEUbqRK6t1Y4+xJGPEkr6nabdqMi0olHv95DvgfoMIFLQthLFmkgcZTbJ xpSPsgina0u6UQpUmbj1RusvWRALe/0W6RlxlLIwM1aphvrVP1R2VFtop/+8bsWmPeqd jkuqsY9/SRz0PYtN5/D8xrFCPFHT7/Bpq+xmgRzCvxxatbMHdcoYtrCkcE2MmBjH8wbx ODaA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=txKqphZ/96SgWDSqQLHEXgj6QbJzdzHtSCA8u7m4XH8=; b=esoi0HnyRfBHgsSgGkCl3Sbgm80tzGbaEt3fF/BanzOjdKJg8ZXCPYPMf3NfBxldL6 rFs7l5BxtQoABY7zCX582hersKCOjHVnjTfXP01gcwbue4tLBMz+BZMpp/1Ip5cef7dQ ij9GHvfaESZ9mz6xde1ICNaaNFKpDvFU8FAyI0L7xzLDDG/UCytYxNxOLFRMY6avME1g pMVF/0GfUXU/oAC2TY6Zr1WIcytqumHsK78cvB+lrRKRlBcRdrLDydDJbxxK+MTKRpog HIHbQUCmWtAWyDtBP500TSsj2FEEBK8PuzZvD40oUP78d1mDHg+I82WCou6ogNisnwMG jX/Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id n8-20020a9d4d08000000b005cb2fc137f5si11404408otf.113.2022.04.07.14.16.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Apr 2022 14:16:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4DA45464C14; Thu, 7 Apr 2022 13:08:16 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244419AbiDGPWE (ORCPT + 99 others); Thu, 7 Apr 2022 11:22:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238945AbiDGPV7 (ORCPT ); Thu, 7 Apr 2022 11:21:59 -0400 X-Greylist: delayed 166844 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 07 Apr 2022 08:19:56 PDT Received: from 1.mo581.mail-out.ovh.net (1.mo581.mail-out.ovh.net [178.33.45.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E23F41FAA3C for ; Thu, 7 Apr 2022 08:19:56 -0700 (PDT) Received: from player796.ha.ovh.net (unknown [10.111.172.176]) by mo581.mail-out.ovh.net (Postfix) with ESMTP id 7D83123291 for ; Thu, 7 Apr 2022 15:19:46 +0000 (UTC) Received: from sk2.org (82-65-25-201.subs.proxad.net [82.65.25.201]) (Authenticated sender: steve@sk2.org) by player796.ha.ovh.net (Postfix) with ESMTPSA id CD8F02932FFCF; Thu, 7 Apr 2022 15:19:39 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-99G0036ce79144-b56c-4add-9154-6fb98c6ebeca, 5995496A90EC26C6A3824F4C00BBD29EFE55D398) smtp.auth=steve@sk2.org X-OVh-ClientIp: 82.65.25.201 From: Stephen Kitt To: Michael Turquette , Stephen Boyd Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Wolfram Sang , Stephen Kitt Subject: [PATCH v2 02/10] clk: cdce925: use i2c_match_id and simple i2c probe Date: Thu, 7 Apr 2022 17:18:23 +0200 Message-Id: <20220407151831.2371706-3-steve@sk2.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220407151831.2371706-1-steve@sk2.org> References: <20220407151831.2371706-1-steve@sk2.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 77124144948741766 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvvddrudejkedgkeejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefuthgvphhhvghnucfmihhtthcuoehsthgvvhgvsehskhdvrdhorhhgqeenucggtffrrghtthgvrhhnpeejleelvdefieeiuddtfeevkeegueehkeekvdffgedvhedugeekgfejjeekgfeugeenucfkpheptddrtddrtddrtddpkedvrdeihedrvdehrddvtddunecuvehluhhsthgvrhfuihiivgepudenucfrrghrrghmpehmohguvgepshhmthhpohhuthdphhgvlhhopehplhgrhigvrhejleeirdhhrgdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomhepshhtvghvvgesshhkvddrohhrghdpnhgspghrtghpthhtohepuddprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrgh X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As part of the ongoing i2c transition to the simple probe ("probe_new"), this patch uses i2c_match_id to retrieve the driver_data for the probed device. The id parameter is thus no longer necessary and the simple probe can be used instead. Signed-off-by: Stephen Kitt --- drivers/clk/clk-cdce925.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/clk/clk-cdce925.c b/drivers/clk/clk-cdce925.c index 308b353815e1..ef9a2d44e40c 100644 --- a/drivers/clk/clk-cdce925.c +++ b/drivers/clk/clk-cdce925.c @@ -634,11 +634,20 @@ static struct regmap_bus regmap_cdce925_bus = { .read = cdce925_regmap_i2c_read, }; -static int cdce925_probe(struct i2c_client *client, - const struct i2c_device_id *id) +static const struct i2c_device_id cdce925_id[] = { + { "cdce913", CDCE913 }, + { "cdce925", CDCE925 }, + { "cdce937", CDCE937 }, + { "cdce949", CDCE949 }, + { } +}; +MODULE_DEVICE_TABLE(i2c, cdce925_id); + +static int cdce925_probe(struct i2c_client *client) { struct clk_cdce925_chip *data; struct device_node *node = client->dev.of_node; + const struct i2c_device_id *id = i2c_match_id(cdce925_id, client); const char *parent_name; const char *pll_clk_name[MAX_NUMBER_OF_PLLS] = {NULL,}; struct clk_init_data init; @@ -814,15 +823,6 @@ static int cdce925_probe(struct i2c_client *client, return err; } -static const struct i2c_device_id cdce925_id[] = { - { "cdce913", CDCE913 }, - { "cdce925", CDCE925 }, - { "cdce937", CDCE937 }, - { "cdce949", CDCE949 }, - { } -}; -MODULE_DEVICE_TABLE(i2c, cdce925_id); - static const struct of_device_id clk_cdce925_of_match[] = { { .compatible = "ti,cdce913" }, { .compatible = "ti,cdce925" }, @@ -837,7 +837,7 @@ static struct i2c_driver cdce925_driver = { .name = "cdce925", .of_match_table = of_match_ptr(clk_cdce925_of_match), }, - .probe = cdce925_probe, + .probe_new = cdce925_probe, .id_table = cdce925_id, }; module_i2c_driver(cdce925_driver); -- 2.27.0