Received: by 2002:a05:6a10:83d0:0:0:0:0 with SMTP id o16csp27857pxh; Thu, 7 Apr 2022 12:59:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzvUz1qx/JGphTtb/l8XbK0GFvAULYz0e1CK2o7/eVup54wZwHuvuydqpi7yVxJNXmKcoMM X-Received: by 2002:a17:903:40c1:b0:156:f1cc:7d72 with SMTP id t1-20020a17090340c100b00156f1cc7d72mr8430938pld.70.1649361571036; Thu, 07 Apr 2022 12:59:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649361571; cv=none; d=google.com; s=arc-20160816; b=a5Lc9TK7HBJdKpNlEe5zs2ZQE62K6nx8EeHHSK6xBvYrwTQ+QKbDTXIFtljeW7wHiU bnB4gQiOmR1Prb7OWfjR8OqgR3taiAB0yM4fJxSSWzutVsBN7/rpIGRpEtTYMKJT+Cbn JsF00uTkjdTbMp+iGnVcF/OA+sQXOtbJJtU2H97YAUgYFK6YI6I2sYzfcUuYNa0bjON0 uCIsvh+gdT9McJjyZg9cilNsfw8IQqMzdNskWF41S++E6HLfuCJNHxMFjXzym6SR8yZY RvFSe2r64mSUZY9WXuSvd3jgib3DPR9wUjXa/ejm5dUDygUGHk3KWlYpzZ5TpG0TyWnf UkMQ== 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=KsyJYmdkRK9K5I1R3JjRGwCaVGvyJvh2K/wrKJwqYx4=; b=mOFCPfd+dhEnLwY0ljV9ytI3bkIeCRGYLFZRh0bz4XtaDkWCywbkv0BCg7ZlsZe0Kc FTrdliPEZ1XnrYTbNDDaOzHzWyCQxWF6XZqapbAWGItNiAwqN4FxJ+craWlT1zGtgvtS iFH4/SyO4LT+YtTe+G6HJxYgdaQVoKkHg0QNWlu0qQewbzDHjyT0GpaiaA80FErnMkxM lJV8oSbXhhzrREhNJ0V7XvqR3NEy/8UqfV19CB4A94i+5d6Kp1EqvCtbdFlvj6esCSeG CQMnD2nNwqeZVOHsr87snEe9BkszgF6/23UQ9Anr7kGkIarVVAyBHX00VLuZ1H86PrxT sIBw== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id v14-20020a056a00148e00b004fa3a8dff9asi21397650pfu.81.2022.04.07.12.59.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Apr 2022 12:59:31 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 AC9E4281826; Thu, 7 Apr 2022 12:25:37 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245481AbiDGPaP (ORCPT + 99 others); Thu, 7 Apr 2022 11:30:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230141AbiDGPaO (ORCPT ); Thu, 7 Apr 2022 11:30:14 -0400 Received: from 2.mo561.mail-out.ovh.net (2.mo561.mail-out.ovh.net [46.105.75.36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D11EE120 for ; Thu, 7 Apr 2022 08:28:13 -0700 (PDT) Received: from player796.ha.ovh.net (unknown [10.108.1.68]) by mo561.mail-out.ovh.net (Postfix) with ESMTP id CEF4724009 for ; Thu, 7 Apr 2022 15:20:39 +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 B079E29330215; Thu, 7 Apr 2022 15:20:30 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-99G003da191969-9655-4f56-b741-88365d4a5fb6, 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 09/10] clk: si570: use i2c_match_id and simple i2c probe Date: Thu, 7 Apr 2022 17:18:30 +0200 Message-Id: <20220407151831.2371706-10-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: 92042318176945798 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvvddrudejkedgkeekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefuthgvphhhvghnucfmihhtthcuoehsthgvvhgvsehskhdvrdhorhhgqeenucggtffrrghtthgvrhhnpeejleelvdefieeiuddtfeevkeegueehkeekvdffgedvhedugeekgfejjeekgfeugeenucfkpheptddrtddrtddrtddpkedvrdeihedrvdehrddvtddunecuvehluhhsthgvrhfuihiivgepfeenucfrrghrrghmpehmohguvgepshhmthhpohhuthdphhgvlhhopehplhgrhigvrhejleeirdhhrgdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomhepshhtvghvvgesshhkvddrohhrghdpnhgspghrtghpthhtohepuddprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrgh 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-si570.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/clk/clk-si570.c b/drivers/clk/clk-si570.c index eea50121718a..1ff8f32f734d 100644 --- a/drivers/clk/clk-si570.c +++ b/drivers/clk/clk-si570.c @@ -398,11 +398,20 @@ static const struct regmap_config si570_regmap_config = { .volatile_reg = si570_regmap_is_volatile, }; -static int si570_probe(struct i2c_client *client, - const struct i2c_device_id *id) +static const struct i2c_device_id si570_id[] = { + { "si570", si57x }, + { "si571", si57x }, + { "si598", si59x }, + { "si599", si59x }, + { } +}; +MODULE_DEVICE_TABLE(i2c, si570_id); + +static int si570_probe(struct i2c_client *client) { struct clk_si570 *data; struct clk_init_data init; + const struct i2c_device_id *id = i2c_match_id(si570_id, client); u32 initial_fout, factory_fout, stability; bool skip_recall; int err; @@ -495,15 +504,6 @@ static int si570_remove(struct i2c_client *client) return 0; } -static const struct i2c_device_id si570_id[] = { - { "si570", si57x }, - { "si571", si57x }, - { "si598", si59x }, - { "si599", si59x }, - { } -}; -MODULE_DEVICE_TABLE(i2c, si570_id); - static const struct of_device_id clk_si570_of_match[] = { { .compatible = "silabs,si570" }, { .compatible = "silabs,si571" }, @@ -518,7 +518,7 @@ static struct i2c_driver si570_driver = { .name = "si570", .of_match_table = clk_si570_of_match, }, - .probe = si570_probe, + .probe_new = si570_probe, .remove = si570_remove, .id_table = si570_id, }; -- 2.27.0