Received: by 2002:a05:6a10:83d0:0:0:0:0 with SMTP id o16csp60934pxh; Thu, 7 Apr 2022 14:00:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJytby20gQH+OliLpM0EtdDPsY6I1i5B3vRK821bKdi8/8MzUnKZjPv1YP3dnG4hNHPLgO6m X-Received: by 2002:a17:902:d4d0:b0:157:c14:12a6 with SMTP id o16-20020a170902d4d000b001570c1412a6mr4227002plg.165.1649365224424; Thu, 07 Apr 2022 14:00:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649365224; cv=none; d=google.com; s=arc-20160816; b=lXHT/W7cnFZ2C7HK8fArhikEuwTAYqWuIku6Lwmmn2uk+OY9TgbLtWArUtciyIvX1h QM085FBpJzEvI3t5xSVxb3cag/+4LciAlp4f5KF9YlFinzTQD0DnwnnfjCM4gqUoTzxI qJiXPDzymaqr6QZC4XjuIeik1phhdrDTZEuzGXMYIyyouojs/xZ9ZBmSSWlAtsrnUJY1 E8VkPzleUOsegUfryj9/1wHzhEAqBCkW3hUR9u+OmVbwdM6wqSQ5WTq0FwBDdqnvE4Hu 0uUyh2xpbs8ChNro1iT1v4M794Y5dR5SlzVRAzkv9m48bAjuhyqaRaatwYltmrwLbpQO cL8w== 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=LqCnJXUR/mO4yNGkyq8ZyJuE9UuyPzhpgV0NUc+QVjE=; b=spdOMucdrCbfBnO7tCZ4UeHMr3wgrtxvhtBWfyhVw4XdBFjF7e7KUzQts7x6OwvmAs 1f1hdt+xEoWpianfeXNdGmnla+tsQk5wmYOQ/MVJ1ChgWnavFpILIbVC8VL1pnBa2scJ 0k12da2/bJ/ArV/qtmZBxfWtAUbKB3PJ2BZ7a+5/sFVtGlOsxVhzKsfwhxpK4YCmyF7i njYeaCBNP6bTSTKjiFE4TooS6s/wTiROlDkVIcYFr7BryTM+WEE7sMeOpiNF3L+xQ7sI 6UhfL2jLgJo3gXubzW633SsqWVgdmUUaDNaGirqVJGRqg89d1nAB3/YYAEkY1HCYj40T yJ5g== 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 cm18-20020a056a00339200b004fa3a8e0042si62549pfb.249.2022.04.07.14.00.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Apr 2022 14:00:24 -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 5A1F229E4CA; Thu, 7 Apr 2022 13:04:47 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344766AbiDGPal (ORCPT + 99 others); Thu, 7 Apr 2022 11:30:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344722AbiDGPag (ORCPT ); Thu, 7 Apr 2022 11:30:36 -0400 X-Greylist: delayed 168324 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 07 Apr 2022 08:28:30 PDT Received: from 15.mo583.mail-out.ovh.net (15.mo583.mail-out.ovh.net [178.33.107.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AECEAC6E for ; Thu, 7 Apr 2022 08:28:30 -0700 (PDT) Received: from player796.ha.ovh.net (unknown [10.110.171.136]) by mo583.mail-out.ovh.net (Postfix) with ESMTP id 6793324403 for ; Thu, 7 Apr 2022 15:20:22 +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 8208729330148; Thu, 7 Apr 2022 15:20:15 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-99G0034497206b-6a9c-4c63-891e-297cf9db652a, 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 07/10] clk: si5351: use i2c_match_id and simple i2c probe Date: Thu, 7 Apr 2022 17:18:28 +0200 Message-Id: <20220407151831.2371706-8-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: 87257243844511366 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvvddrudejkedgkeekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefuthgvphhhvghnucfmihhtthcuoehsthgvvhgvsehskhdvrdhorhhgqeenucggtffrrghtthgvrhhnpeejleelvdefieeiuddtfeevkeegueehkeekvdffgedvhedugeekgfejjeekgfeugeenucfkpheptddrtddrtddrtddpkedvrdeihedrvdehrddvtddunecuvehluhhsthgvrhfuihiivgepudenucfrrghrrghmpehmohguvgepshhmthhpohhuthdphhgvlhhopehplhgrhigvrhejleeirdhhrgdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomhepshhtvghvvgesshhkvddrohhrghdpnhgspghrtghpthhtohepuddprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrgh 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-si5351.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/clk/clk-si5351.c b/drivers/clk/clk-si5351.c index 93fa8c9e11be..b9f088c4ba2f 100644 --- a/drivers/clk/clk-si5351.c +++ b/drivers/clk/clk-si5351.c @@ -1367,9 +1367,18 @@ si53351_of_clk_get(struct of_phandle_args *clkspec, void *data) } #endif /* CONFIG_OF */ -static int si5351_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) +static const struct i2c_device_id si5351_i2c_ids[] = { + { "si5351a", SI5351_VARIANT_A }, + { "si5351a-msop", SI5351_VARIANT_A3 }, + { "si5351b", SI5351_VARIANT_B }, + { "si5351c", SI5351_VARIANT_C }, + { } +}; +MODULE_DEVICE_TABLE(i2c, si5351_i2c_ids); + +static int si5351_i2c_probe(struct i2c_client *client) { + const struct i2c_device_id *id = i2c_match_id(si5351_i2c_ids, client); enum si5351_variant variant = (enum si5351_variant)id->driver_data; struct si5351_platform_data *pdata; struct si5351_driver_data *drvdata; @@ -1649,21 +1658,12 @@ static int si5351_i2c_remove(struct i2c_client *client) return 0; } -static const struct i2c_device_id si5351_i2c_ids[] = { - { "si5351a", SI5351_VARIANT_A }, - { "si5351a-msop", SI5351_VARIANT_A3 }, - { "si5351b", SI5351_VARIANT_B }, - { "si5351c", SI5351_VARIANT_C }, - { } -}; -MODULE_DEVICE_TABLE(i2c, si5351_i2c_ids); - static struct i2c_driver si5351_driver = { .driver = { .name = "si5351", .of_match_table = of_match_ptr(si5351_dt_ids), }, - .probe = si5351_i2c_probe, + .probe_new = si5351_i2c_probe, .remove = si5351_i2c_remove, .id_table = si5351_i2c_ids, }; -- 2.27.0