Received: by 2002:a05:6a10:83d0:0:0:0:0 with SMTP id o16csp43737pxh; Thu, 7 Apr 2022 13:27:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJybkj/zyYl79+E1wLyjdETHmSKM5NR7uWY4IAWiATni47dYhnsrzpyFYWXvzG+1q10Wg0ra X-Received: by 2002:a05:6a00:b47:b0:4fd:a5b5:a279 with SMTP id p7-20020a056a000b4700b004fda5b5a279mr15991304pfo.19.1649363248678; Thu, 07 Apr 2022 13:27:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649363248; cv=none; d=google.com; s=arc-20160816; b=tBonDDDpZNlfpvUyuyGZJxBHNdmgxSTZqpCjor5ZSQ8vqqF0B4Xs16yRpCUd/YJ27G lSJh8jMRa0UMX4l9UMsoFDtubWv3Os8ntl2tIU/v5qIsb8sqbl/4r2/irbJhsisH+qIc TmRe7GONDCZ4u/yJbi8v3/YVscx8WwhemWxSCfVFvmrFrLtXNnWSmOzwA+gJx+X29sFj Tb7kOl5zrLu0cwYdMZzEv9I47uNSbVf7but9xuK3YRrYWjkOgkfuDTEb110qNErlCZzB 2EV5R/fy9kkgvSF2m579QgawnlU3SlGXCKlLzRJey8TLBQnCPwamTe5XZ06NMR2MEsdr IGDw== 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=SI0BUioBWsxptp9apmfjcw3QD2iRghNCojmDnMqgbTs=; b=GyxlvbEv1vATicbNAdbO0tEZxIzCPX6W/ihzUlQtGEsj4HqKZzd1y4i6xyCXgJh0oq RYi4J+GSwNr3tUs7WCwOEh++kpsj9t+dUPIX8JYZZKLUpIFjrKqZKCqwqBZeWO98I4uK 4mFfxoMSFOafZUlytVdUMIRm1BYZXe0gKZweuuPspVkOpGHPshWWmGwt9m+lGL5GrKmf xwr4TKoO9zQgBft2iTxB1lskkgVzTkbKm2/Ycr34Od/qHQzDKChFEUx8eOQOWJTTXlxa 76Ci5DrN3UxD4JxPbX8g3X1j+ozZyVayjjhyHn2abg1HRr8ACihu5TbeaHLqHL8ClMWg ONWw== 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 oc1-20020a17090b1c0100b001cac1781bf6si2838579pjb.159.2022.04.07.13.27.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Apr 2022 13:27:28 -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 CC1F0362211; Thu, 7 Apr 2022 12:42:48 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240687AbiDGPkP (ORCPT + 99 others); Thu, 7 Apr 2022 11:40:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232934AbiDGPkO (ORCPT ); Thu, 7 Apr 2022 11:40:14 -0400 X-Greylist: delayed 590 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 07 Apr 2022 08:38:14 PDT Received: from 4.mo561.mail-out.ovh.net (4.mo561.mail-out.ovh.net [178.33.46.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04FE3DC6 for ; Thu, 7 Apr 2022 08:38:13 -0700 (PDT) Received: from player796.ha.ovh.net (unknown [10.111.208.131]) by mo561.mail-out.ovh.net (Postfix) with ESMTP id BA73123EE2 for ; Thu, 7 Apr 2022 15:20:30 +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 DD6AA293301E3; Thu, 7 Apr 2022 15:20:22 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-99G0034263be14-6f21-4a81-963b-ca0d4b4f9814, 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 08/10] clk: si544: use i2c_match_id and simple i2c probe Date: Thu, 7 Apr 2022 17:18:29 +0200 Message-Id: <20220407151831.2371706-9-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: 89509043186730630 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvvddrudejkedgkeekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefuthgvphhhvghnucfmihhtthcuoehsthgvvhgvsehskhdvrdhorhhgqeenucggtffrrghtthgvrhhnpeejleelvdefieeiuddtfeevkeegueehkeekvdffgedvhedugeekgfejjeekgfeugeenucfkpheptddrtddrtddrtddpkedvrdeihedrvdehrddvtddunecuvehluhhsthgvrhfuihiivgepvdenucfrrghrrghmpehmohguvgepshhmthhpohhuthdphhgvlhhopehplhgrhigvrhejleeirdhhrgdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomhepshhtvghvvgesshhkvddrohhrghdpnhgspghrtghpthhtohepuddprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrgh 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-si544.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/clk/clk-si544.c b/drivers/clk/clk-si544.c index d9ec9086184d..089786907641 100644 --- a/drivers/clk/clk-si544.c +++ b/drivers/clk/clk-si544.c @@ -451,11 +451,19 @@ static const struct regmap_config si544_regmap_config = { .volatile_reg = si544_regmap_is_volatile, }; -static int si544_probe(struct i2c_client *client, - const struct i2c_device_id *id) +static const struct i2c_device_id si544_id[] = { + { "si544a", si544a }, + { "si544b", si544b }, + { "si544c", si544c }, + { } +}; +MODULE_DEVICE_TABLE(i2c, si544_id); + +static int si544_probe(struct i2c_client *client) { struct clk_si544 *data; struct clk_init_data init; + const struct i2c_device_id *id = i2c_match_id(si544_id, client); int err; data = devm_kzalloc(&client->dev, sizeof(*data), GFP_KERNEL); @@ -499,14 +507,6 @@ static int si544_probe(struct i2c_client *client, return 0; } -static const struct i2c_device_id si544_id[] = { - { "si544a", si544a }, - { "si544b", si544b }, - { "si544c", si544c }, - { } -}; -MODULE_DEVICE_TABLE(i2c, si544_id); - static const struct of_device_id clk_si544_of_match[] = { { .compatible = "silabs,si544a" }, { .compatible = "silabs,si544b" }, @@ -520,7 +520,7 @@ static struct i2c_driver si544_driver = { .name = "si544", .of_match_table = clk_si544_of_match, }, - .probe = si544_probe, + .probe_new = si544_probe, .id_table = si544_id, }; module_i2c_driver(si544_driver); -- 2.27.0